You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 29, 2021. It is now read-only.
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.
4
4
@@ -11,11 +11,25 @@ To use this library you only have to call 2 methods and everything will be autom
11
11
First step is to call `ConsoleAwesome.Initialize("Name of your bot")` which initializes the message handler.
12
12
You should call it early in your program to be able to use write methods provided by ConsoleAwesome.
13
13
14
-
Second step is to bind console to BotBits client with `ConsoleAwesome.BindClient(YourBotBitsClient)`.
15
-
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.
14
+
Second step is to bind console to BotBits client with `ConsoleAwesome.BindClient(BotBitsClient)`.
15
+
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.
16
16
17
17
# Commands
18
18
19
19
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.
20
20
If you want to execute other commands you should prefix them with '/' or '!'.
21
-
For example typing '/help' would execute the help command.
21
+
For example typing '/help' would execute the help command.
22
+
23
+
## Custom commands
24
+
25
+
If you didn't bind BotBitsClient to the ConsoleAwesome you can add custom commands with `ConsoleAwesome.AddCustomCommand()` method.
26
+
It accepts name of the command as first parameter and action to be executed as second.
27
+
These commands are then executed when console input starts with specified command name.
28
+
Whole input text is provided as an argument to the action so you can parse it to handle additional command arguments.
29
+
30
+
**NOTE:** You can't add multiple actions for single command name and command names shouldn't contain any spaces.
31
+
32
+
# Logging
33
+
34
+
You can enable logging of the messages by setting `ConsoleAwesome.LogFile` parameter.
35
+
Once it's set to something different than null or white space all output will be appended to the path specified by `LogFile`.
0 commit comments