Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tunous committed Jan 8, 2016
1 parent a1a884e commit 5d20c0d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ConsoleAwesome/ConsoleAwesome.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>$id$</id>
<version>1.0.2</version>
<version>1.1.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ConsoleAwesome
# ConsoleAwesome ![Version](https://img.shields.io/nuget/v/ConsoleAwesome.svg?label=version) [![Build status](https://ci.appveyor.com/api/projects/status/1hxfce410715c2fl?svg=true)](https://ci.appveyor.com/project/Tunous/consoleawesome)

ConsoleAwesome provieds easy access to execution of BotBits commands from the command line and displays various EverybodyEdits messages received through BotBits in an easy to read way.

Expand All @@ -11,11 +11,25 @@ To use this library you only have to call 2 methods and everything will be autom
First step is to call `ConsoleAwesome.Initialize("Name of your bot")` which initializes the message handler.
You should call it early in your program to be able to use write methods provided by ConsoleAwesome.

Second step is to bind console to BotBits client with `ConsoleAwesome.BindClient(YourBotBitsClient)`.
This will handle listening and displaying of chat/info/etc messages and will allow you to execute commands by simply typing them in the console.
Second step is to bind console to BotBits client with `ConsoleAwesome.BindClient(BotBitsClient)`.
This will handle listening and displaying of chat/info/etc messages and will allow you to execute BotBits commands by simply typing them in the console.

# Commands

When you type something into the console and press enter it will be sent to the bot using say command which simply results in bot saying what you wrote.
If you want to execute other commands you should prefix them with '/' or '!'.
For example typing '/help' would execute the help command.
For example typing '/help' would execute the help command.

## Custom commands

If you didn't bind BotBitsClient to the ConsoleAwesome you can add custom commands with `ConsoleAwesome.AddCustomCommand()` method.
It accepts name of the command as first parameter and action to be executed as second.
These commands are then executed when console input starts with specified command name.
Whole input text is provided as an argument to the action so you can parse it to handle additional command arguments.

**NOTE:** You can't add multiple actions for single command name and command names shouldn't contain any spaces.

# Logging

You can enable logging of the messages by setting `ConsoleAwesome.LogFile` parameter.
Once it's set to something different than null or white space all output will be appended to the path specified by `LogFile`.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.0.{build}
version: 1.1.{build}

nuget:
disable_publish_on_pr: true
Expand Down

0 comments on commit 5d20c0d

Please sign in to comment.