Rapptz
e2de93e2a6
[commands] Make Command a descriptor for #426 .
8 years ago
PapyrusThePlant
31cd9ad37a
[commands] Bugfix on the teardown function call.
8 years ago
Rapptz
bed2e90e82
Properly propagate loop. Fixes #420 .
8 years ago
Rapptz
00e30f3106
[commands] Shield against dictionary resize in Bot.close
8 years ago
Rapptz
fc1a7183a0
[commands] Unload all cogs when gracefully exiting bot.
8 years ago
Rapptz
6d88024f0f
[commands] Add special extension function 'teardown' for clean-up.
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 .
8 years ago
Rapptz
bafaf72c89
[commands] Unload all extensions when gracefully closing bot.
8 years ago
Rapptz
967d43c35b
[commands] Allow coroutine functions in Bot.command_prefix
9 years ago
Rapptz
1e9251cfef
[commands] Delete module when it does not have a setup function.
9 years ago
Rapptz
cd87f247d3
[commands] Make Bot.check decorator an actual decorator.
9 years ago
PapyrusThePlant
1aaeeff02b
[commands] Added missing parenthesis in examples
9 years ago
Rapptz
adbf2c720f
[commands] Add the concept of global checks.
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.
9 years ago
Rapptz
6f173cc095
[commands] Add `delete_after` keyword argument to utility functions.
This includes things like `Bot.say`, `Bot.upload`, `Bot.whisper`,
and `Bot.reply`.
9 years ago
Rapptz
4dbac9423d
[commands] Only show CommandNotFound on non-empty commands.
9 years ago
Rapptz
bde266bbb9
[commands] Fix @everyone elevation in the default help command.
9 years ago
Rapptz
a0f37f8e85
[commands] Fix issue with proper local error handlers not beign called.
9 years ago
Rapptz
b9c7b05176
[commands] Unify Command.handle_local_error into general dispatcher.
9 years ago
Rapptz
37dfe38af5
[commands] Fix bug where Context.command would not update.
9 years ago
Khazhismel Kumykov
33a69681fc
[commands] Dispatch command_error on command exec error.
Provide fallback on_command_error - will only fire if no cog handlers and
no local handler.
Propagate exceptions in checks and argument parsing to bot.
9 years ago
Rapptz
20e86973ea
[commands] Delete frame objects when done using them.
9 years ago
Rapptz
3c8fcd3584
[commands] Add support for self-bots.
9 years ago
Rapptz
fdaa4299a3
[commands] Fix when_mentioned when handling nicknames.
9 years ago
Rapptz
1c623ccf11
Begin working on gateway v4 support.
Bump websockets requirement to v3.1
Should be squashed...
9 years ago
Rapptz
82b2421ac7
[commands] Add deterministic cog unloading.
The special function is `__unload` to prevent with name conflicts with
existing or future cogs.
9 years ago
Rapptz
c015e492d7
[commands] Don't yield from inside bot utility functions.
9 years ago
Rapptz
4a1313f00c
[commands] Add when_mentioned_or helper to have mentions and prefixes.
9 years ago
Rapptz
c0dba0f4f2
[commands] Fix typo in Bot.upload docstring.
9 years ago
Rapptz
bf2b8744a5
[commands] Do not swallow AttributeErrors raised by the setup function
9 years ago
Rapptz
98090a2a57
[commands] Helper functions now take *args and **kwargs.
9 years ago
Rapptz
d013032522
[commands] Allow setting the bot error messages in the help command.
This is to help out those folks that don't speak English.
9 years ago
Rapptz
bb5e222f29
[commands] Add Bot.help_attrs to customise the help command.
The help message now uses the invoked_with attribute of the context to
get the name of the command it uses instead of a hardcoded help.
9 years ago
Rapptz
abbe79919b
[commands] Change Bot.pm_help to be an optional bool.
The behaviour of passing in pm_help=None makes it so the bot will only
send private messages if the length of the message is too "big", which
is defined as having more than 1000 characters in the output.
9 years ago
Rapptz
bc7606a42c
[commands] Add on_command and on_command_completion events.
9 years ago
Rapptz
18c71ab57c
[commands] Fix issue where Bot would raise if not given a description.
9 years ago
Rapptz
b1d8e12609
[commands] Cleanup descriptions being passed.
9 years ago
Rapptz
4edff12f6b
Proper exception chaining.
9 years ago
Rapptz
31db6efc7f
[commands] Fix handling of nested subcommand help handling.
9 years ago
Rapptz
b335e9ea30
[commands] Support invoking the help command with a cog name.
9 years ago
Rapptz
958d278771
[commands] Initial implementation of help command.
9 years ago
Rapptz
efcc55bd32
[commands] Proper cleanup of cogs.
9 years ago
Rapptz
b87d5e5337
[commands] Add basic support for extensions.
9 years ago
Rapptz
0a07fc088c
[commands] Inject the internal variables for bot.say & co explicitly.
This is to catch cases where it wouldn't fail to find it when
inspecting the stack to catch these stack variables.
9 years ago
Rapptz
ec6b1997ad
[commands] Add support for cogs.
Cogs are basically class instances that have commands and event
listeners. They allow for better organisation and grouping of
commands and state. Similar to subclassing discord.Client.
9 years ago
Rapptz
c06dbbd1f0
[commands] Add support for registering more than one event listener.
9 years ago
Rapptz
52eb0e3adb
[commands] Change prefix callback signature and add when_mentioned.
The utility allows for easy addition of "when the bot is mentioned"
as the prefix. The change of signature was to facilitate this.
9 years ago
Rapptz
542ddc4938
[commands] Allow registration of multiple command prefixes.
9 years ago
Rapptz
8c6eeeed5f
[commands] Don't skip whitespace if the command trigger is found.
9 years ago
Rapptz
51186c3ca4
[commands] Add CommandNotFound error.
9 years ago
Rapptz
59ca5ec386
Initial implementation of commands extension module.
9 years ago