aboutsummaryrefslogtreecommitdiff
path: root/discord/ext
Commit message (Collapse)AuthorAgeFilesLines
* [commands] Make Command a descriptor for #426.Rapptz2017-02-112-2/+5
|
* [commands] Better support for retrieving children commands.Rapptz2017-02-061-2/+25
| | | | | * GroupMixin.get_command now supports fully qualified names * Add GroupMixin.walk_commands to get an iterator of all commands.
* [commands] Bugfix on the teardown function call.PapyrusThePlant2017-01-011-1/+1
|
* Properly propagate loop. Fixes #420.Rapptz2016-12-211-1/+1
|
* [commands] Shield against dictionary resize in Bot.closeRapptz2016-12-171-2/+2
|
* [commands] Unload all cogs when gracefully exiting bot.Rapptz2016-12-171-0/+6
|
* [commands] Properly propagate CommandError derived exceptions.Rapptz2016-12-171-0/+2
| | | | | | If a command or a group raised a CommandError derived exception it would be wrapped into CommandInvokeError. This fixes this case so it raises the original exception instead.
* [commands] Add special extension function 'teardown' for clean-up.Rapptz2016-12-171-4/+14
| | | | | | | | | | | | This is to support people who want to clean up some external resource that the extension is maintaining outside of a cog, where __unload should be used instead. The callable is the antipode of 'setup' and takes the same sole parameter, the bot, after all commands, events, and cogs have been unloaded. Fixes #405.
* [commands] Unload all extensions when gracefully closing bot.Rapptz2016-12-171-0/+10
|
* [commands] Run global checks in help formatter.khazhyk2016-12-161-1/+1
| | | | | | Help formatter was not checking global bot-level checks, resulting in showing commands a user did not have permission for with show_check_failure disabled.
* [commands] Remove slots on Context.Rapptz2016-11-221-3/+0
| | | | | | | This is to allow people to set temporary local variables by injecting them directly into the context via some decorator or some other mechanism. Contexts are not kept alive long enough to warrant being slotted.
* [commands] Fix mistake in Paginator error message.Max Kamps2016-10-031-1/+1
|
* [commands] Fix Paginator still allowing lines which are too long.Max Kamps2016-10-031-1/+1
|
* [commands] Raise exception if Paginator gets a line that is too big.Rapptz2016-09-261-0/+11
| | | | Fixes #340
* [commands] Allow coroutine functions in Bot.command_prefixRapptz2016-09-171-3/+8
|
* [commands] Default converters now take in IDs to match against.Rapptz2016-09-091-10/+17
|
* [commands] Cooldowns don't trigger due to user usage error.Rapptz2016-09-081-11/+9
| | | | Fixes #325
* [commands] Added a method to reset command cooldown.Dan Hess2016-09-082-0/+17
|
* [commands] Delete module when it does not have a setup function.Rapptz2016-08-101-0/+2
|
* [commands] Add missing inspect import in converter.pyRapptz2016-08-041-0/+1
|
* [commands] Add custom emoji converter.Khazhismel2016-07-311-0/+31
|
* [commands] Make HelpFormatter ignore hidden commands for max_width.PapyrusThePlant2016-07-301-1/+1
|
* [commands] Fix cooldown decorator to work regardless of order.Rapptz2016-07-221-1/+1
|
* [commands] Implement a command cooldown system.Rapptz2016-07-224-3/+193
| | | | | | | | | | | | | | | | | The way the command cooldown works is using a windowed way of doing it. That is, if we have a cooldown of 2 commands every 30 seconds then if we do a single command, we have 30 seconds to do the second command or else we will get rate limited. This more or less matches the common expectations on how cooldowns should be. These cooldowns can be bucketed up to a single dimension of depth for a per-user, per-guild, or per-channel basis. Of course, a global bucket is also provided. These cannot be mixed, e.g. no per-channel per-user cooldowns. When a command cooldown is triggered, the error handlers will receive a an exception of type CommandOnCooldown with proper information regarding the cooldown such as retry_after and the bucket information itself.
* [commands] Add UserInputError into the exception hierarchy.Rapptz2016-07-211-8/+18
| | | | | | | | | | | This is for exceptions that are inherently based on user errors and not permission based. e.g. passing incorrect number of arguments, too many arguments, or an invalid argument. CommandNotFound is not classified under this since it isn't inherently a user input error in all cases. Some invalid commands can simply be due to an odd bot prefix. It would also diminish the usefulness of the new parent class if CommandNotFound was included.
* [commands] Make Bot.check decorator an actual decorator.Rapptz2016-07-081-6/+4
|
* [commands] Added missing parenthesis in examplesPapyrusThePlant2016-07-081-8/+8
|
* [commands] Refactor pagination into its own class.Rapptz2016-07-052-49/+71
| | | | | | This change allows users to more easily create their own formatters without having to reinvent the pagination logic themselves. Hopefully this makes it less of a pain for people to create custom help pages.
* [commands] Fix error in converters in a private message context.Rapptz2016-07-022-11/+11
| | | | | I was referencing a member function that did not actually exist. So I ported it over to a free function that could be used.
* [commands] Do not lower-case the function name for default command namesRapptz2016-07-011-2/+2
| | | | There are some badlets out there that apparently violate PEP-8.
* [commands] Make GroupMixin.remove_command return None.Rapptz2016-06-301-0/+5
| | | | | This is for cases where the command has been removed already. This will make the function have a somewhat no exception guarantee.
* [commands] Fix error where consume rest would not work.Rapptz2016-06-231-1/+1
| | | | I didn't end up refactoring this piece of work out.
* [commands] Fix bug that made functions stop working as converters.Rapptz2016-06-231-1/+1
|
* [commands] Port special cased discord converters to commands.ConverterRapptz2016-06-223-116/+163
|
* [commands] Add commands.Converter base for converts with context.Rapptz2016-06-221-5/+38
| | | | | This allows users to implement converters that work similar to the ones special cased by the `discord` classes.
* [commands] Add Command.ignore_extra attribute to ignore extra argumentsRapptz2016-06-202-3/+20
| | | | | | | | | | | This allows you to strictly require a number of arguments. The default behaviour in this case is still `True`, since it would be a breaking change otherwise and is a sane default. However if someone would want to set this to `False`, they would receive an exception of type `TooManyArguments` if too many arguments are passed to a command. Hopefully this removes the uses of `ctx.message.content == 'stuff'` inside commands.
* [commands] Add the concept of global checks.Rapptz2016-06-192-2/+90
| | | | | | | Global checks are checks that are executed before regular per-command checks except done to every command that the bot has registered. This allows you to have checks that apply to every command without having to override `on_message` or appending the check to every single command.
* [commands] Add `delete_after` keyword argument to utility functions.Rapptz2016-06-191-4/+82
| | | | | This includes things like `Bot.say`, `Bot.upload`, `Bot.whisper`, and `Bot.reply`.
* [commands] Add Context.cog property.Rapptz2016-06-161-0/+7
|
* [commands] Only show CommandNotFound on non-empty commands.Rapptz2016-06-141-1/+1
|
* [commands] Make the CommandError required argument optional again.Rapptz2016-06-101-4/+7
|
* [commands] Fix @everyone elevation in the default help command.Rapptz2016-06-101-2/+14
|
* [commands] Fix bug with Context.command not updating in groups.Rapptz2016-06-101-0/+1
| | | | This happened when `invoke_without_command` was set to True.
* [commands] Make it so CommandError does not contain @everyone mentions.Rapptz2016-06-101-1/+5
| | | | Mitigates some permission elevation issues.
* [commands] Exceptions raised while invocation raise CommandInvokeError.Rapptz2016-06-102-2/+15
| | | | | | This change should make it a bit more intuitive to get the original exception without having the gotcha of checking ``isinstance`` inside the error handler.
* [commands] Fix issue with proper local error handlers not beign called.Rapptz2016-06-101-1/+1
|
* [commands] Unify Command.handle_local_error into general dispatcher.Rapptz2016-06-052-9/+11
|
* [commands] Add Command.qualified_name to get the full command name.Rapptz2016-06-042-16/+36
| | | | This also sets `__str__` to do the same thing.
* [commands] Fix bug where Context.command would not update.Rapptz2016-06-042-1/+2
|
* [commands] Fix bug where subgroups would be repeatedly called.Rapptz2016-06-041-2/+6
| | | | | | | This happened due to not resetting the `invoked_subcommand` state tracking. Since the `invoked_subcommand` was not reset, it would always assume that it was valid and repeatedly call it when passed invalid subcommands/arguments.