aboutsummaryrefslogtreecommitdiff
path: root/src/ext/framework/create_command.rs
Commit message (Collapse)AuthorAgeFilesLines
* hashmap of usagesTaavetti Sjelkov2017-01-021-1/+1
|
* Implement context message queueingTaavi2017-01-011-5/+5
| | | Also the dreaded `ctx <<= "something"` which is actually a mistake.
* Add command alias support and command.exampletaavi?2016-12-291-1/+26
|
* Default Framework command use_quotes to falseAustin Hellyer2016-12-181-1/+1
|
* Framework blocks, disabled commands, improvementsIllia2016-12-141-4/+13
|
* Slightly rework framework bucketsAustin Hellyer2016-12-141-44/+43
|
* Implement command groups and bucketsIllia2016-12-131-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement command groups * change to ref mut * Implement framework API. * Remove commands field * Make it all work * Make example use command groups * Requested changes * Implement adding buckets * Add ratelimit check function * Finish everything * Fix voice example * Actually fix it * Fix doc tests * Switch to result * Savage examples * Fix docs * Fixes * Accidental push * 👀 * Fix an example * fix some example * Small cleanup * Abstract ratelimit bucket logic
* More config for CreateCommand, add various methodsIllia2016-12-101-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds multiple configurations to the command builder, and adds methods to various structs. Context::get_current_user is a shortcut to retrieve the current user from the cache. Message::get_member retrieves the member object of the message, if sent in a guild. Message::is_private checks if the message was sent in a Group or PrivateChannel. User::member retrieves the user's member object in a guild by Id; Adds 6 configurations to the command builder: - dm_only: whether the command can only be used in direct messages; - guild_only: whether the command can only be used in guilds; - help_available: whether the command should be displayed in the help list; - max_args: specify the maximum number of arguments a command must be given; - min_args: specify the minimum number of arguments a command must be given; - required_permissions: the permissions a member must have to be able to use the command;
* Command builder, quoted args, and multi-prefixesIllia2016-12-091-0/+131
Add a command builder, which can take arguments such as multiple checks, quoted arguments, and multiple prefix support, as well as dynamic prefixes per context.