aboutsummaryrefslogtreecommitdiff
path: root/src/ext/framework
Commit message (Collapse)AuthorAgeFilesLines
* Make command macro functions publicAustin Hellyer2016-11-301-2/+2
| | | | This will allow the command macro to be used in sub-modules.
* Clarify some docsAustin Hellyer2016-11-301-1/+1
|
* Clean up the codebaseAustin Hellyer2016-11-292-39/+8
|
* Fix doctestsAustin Hellyer2016-11-281-3/+3
|
* Add before/after framework command hooksIllia K2016-11-282-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These hooks will each be run prior to or after the command, and will finish execution before executing the command. These can be configured in a Framework via: ```rs client.with_framework(|f| f .before(|_context, message, _command_name| { println!("Got command '{}'", command_name); }) .after(|_context, _message, command_name| { println!("Finished command '{}'", command_name); })); ``` This does introduce a backwards compatibility break, by requiring commands' Context/Message to be borrowed Upgrade path: If not using the `command!` macro, modify command signatures from: ```rs fn some_command(context: Context, message: Message, args: Vec<String>) ``` to ```rs fn some_command(context: &Context, message: &Message, args: Vec<String>) ```
* Add a bit more docsAustin Hellyer2016-11-263-0/+122
|
* Add no-named-argument command macro matchAustin Hellyer2016-11-261-1/+37
|
* Move events into their own moduleAustin Hellyer2016-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | The events were cluttering the `model` module, and so are now moved into their own `model::event` module. As users should not usually have to work with events all that much - only currently in some rarely used event handlers - this change should not be much more effort to import from. i.e.: ```rs use serenity::model::event::ChannelPinsAckEvent; ``` vs. the now-old: ```rs use serenity::model::ChannelPinsAckEvent; ```
* Rename the `http` module to `rest`Austin Hellyer2016-11-251-2/+2
|
* Add framework command named argumentsAustin Hellyer2016-11-211-0/+23
|
* A bit of docsAustin Hellyer2016-11-182-5/+116
|
* Fix some clippy lintsAustin Hellyer2016-11-101-16/+2
|
* Framework: fix command arg positioningAustin Hellyer2016-11-082-46/+71
| | | | | | | | | | The command system assumed that prefixes were only one character long, so count the total length of the prefix. In addition, the `allow_whitespace` configuration added some difficulty in deciding where to count as the initial position to start splitting for arguments. Instead of fixing that, rewrite the framework to make these types of changes easier in the future.
* Add arguments to framework commandsAustin Hellyer2016-11-072-3/+8
|
* Add an 'allow_whitespace' framework configAustin Hellyer2016-11-062-31/+84
| | | | | | | | | | | | | | The option allows whitespace to be optional between a mention and a command. Setting it to true will allow the following scenario to occur, while false will not: ``` <@BOT_ID>about // bot process and executes the "about" command if it exists ```
* Allow non-prefixed mentionsAustin Hellyer2016-11-061-15/+20
| | | | | Allow frameworks to be made and dispatched to that listen for mentions, but not for prefixes.
* Initial commitAustin Hellyer2016-10-183-0/+177