aboutsummaryrefslogtreecommitdiff
path: root/discord/ext
Commit message (Collapse)AuthorAgeFilesLines
* [commands] Raise when an invalid prefix is given.Rapptz2017-08-151-5/+18
| | | | Fixes #712
* [commands] Ensure no mentions escape clean_contentRapptz2017-08-101-10/+2
| | | | | Some clever nicknames or role names would lead themselves to resolving to pings.
* [commands] Fix clean_content converter not properly escaping mentions.Rapptz2017-08-101-24/+29
| | | | | | | | In some cases, the Discord provided role_mentions and mentions array would be empty, such as wrapping a mention with a backtick or other frivolous characters. Since we want to completely nullify mentions, we should not rely on the Discord provided arrays and instead use and resolve the IDs from the content itself.
* [commands] Fix Command.root_parent not properly working.Rapptz2017-07-191-2/+4
|
* [commands] Restart the StringView properly in Context.reinvoke.Rapptz2017-07-181-1/+3
| | | | | | | | | The old code for some reason assumed that the length of the command would be 1. This is because when I tested this I would use single letter command names and it would "just work" when in reality it was completely incorrect. A reminder to thoroughly test instead of just fitting something to work
* [commands] Remove support for pass_context=False in Command.Rapptz2017-07-183-17/+13
|
* First pass at commands narrative documentation.Rapptz2017-07-081-2/+2
|
* [commands] unload cog submoduleskhazhyk2017-07-071-0/+3
| | | | | | | | When unloading cogs, currently we do not remove submodules from sys.modules, meaning they will not be reloaded. Removing here makes new imports reload from file. Of course, any already imported modules will still hold a reference to the old module, since they will not re-import it, and will not be forcably unloaded.
* [commands] fix unloading incorrect cogskhazhyk2017-07-031-3/+6
| | | | | | unload_extension would incorrectly unload cogs/listeners of other extensions if the name of one was a prefix of another.
* [commands] clean up remove_cog documentationkhazhyk2017-07-031-3/+2
| | | remove_cog always returns None, even if the cog is found.
* [commands] Improve commands.when_mentioned_or documentation.Rapptz2017-07-011-2/+19
|
* [commands] Do not take up 'command' keyword-argument in Context.invoke.Rapptz2017-06-271-3/+12
| | | | | It was annoying when commands would have a keyword-only argument named 'command', such as a help command or a disable command.
* [commands] Add parameter that failed in fall-back BadArgument error.Rapptz2017-06-261-1/+1
|
* [commands] Ensure that Context.command is the command in Command.can_runRapptz2017-06-211-17/+23
| | | | | | | | | Previously, Context.command was not guaranteed to be the actual command being checked if it can run. This could be troublesome when implementing help commands or when using the default help command. This new change allows at least for the guarantee that Context.command to be technically correct in Command.can_run.
* [commands] Add Bot.check_once for a global check that is called once.Rapptz2017-06-201-11/+74
| | | | | | | There is a counterpart for this in cogs, called __global_check_once. This allows for predicates that would filter a command globally that do not necessarily require rechecking in the case of e.g. the help command such as blocking users or blocking channels.
* [commands] Try to use the proper name when conversion fails.Rapptz2017-06-171-1/+6
|
* [commands] Fix cog error detection in the default global error handler.Rapptz2017-06-131-1/+1
|
* [commands] Don't display default error handler if a cog local exists.Rapptz2017-06-121-2/+8
|
* [commands] Add docstrings for extension loading.Rapptz2017-06-051-0/+42
|
* [commands] Allow inline advanced converters via classmethods.Rapptz2017-06-011-4/+10
| | | | | That way you don't need to have, e.g. Foo and FooConverter and can do it inline via Foo instead.
* [commands] Add escape_markdown parameter for clean_content.Rapptz2017-05-281-1/+16
|
* [commands] Fix EmojiConverter not working with underscore names.Rapptz2017-05-261-3/+3
|
* Use Python3Lexer instead of PythonLexer for pygments.Rapptz2017-05-222-8/+8
|
* [commands] Add Context.reinvoke and Command.root_parentRapptz2017-05-192-2/+128
| | | | | | | | | | | Context.reinvoke would be the new way to bypass checks and cooldowns. However, with its addition comes a change in the invocation order of checks, callbacks, and cooldowns. While previously cooldowns would trigger after command argument parsing, the new behaviour parses cooldowns before command argument parsing. The implication of this change is that Context.args and Context.kwargs will no longer be filled properly.
* [commands] Fix Context.command_failed from being incorrect.Rapptz2017-05-183-2/+5
| | | | | | When used, it would be set to False after the invoke was done. Ideally it should report to False during invoke but True during any error case.
* [commands] Update check examples to work with rewrite.Rapptz2017-05-151-10/+10
|
* First pass at documentation reform.Rapptz2017-05-126-165/+265
|
* [commands] Converter.convert is always a coroutine.Rapptz2017-05-102-78/+83
| | | | | | | | Along with this change comes with the removal of Converter.prepare and adding two arguments to Converter.convert, the context and the argument. I suppose an added benefit is that you don't have to do attribute access since it's a local variable.
* [commands] Fix default error handler to work with the switch.Rapptz2017-05-101-1/+1
|
* [commands] Re-order error handler arguments.Rapptz2017-05-102-7/+7
| | | | | They now have Context as the first argument to be consistent with other context-passing functions.
* [commands] Export is_nsfw check.Rapptz2017-05-051-1/+1
|
* [commands] Add is_nsfw check.Rapptz2017-05-011-0/+6
|
* [commands] Fix lack of space in when_mentionedRapptz2017-04-241-1/+1
|
* [commands] Add Context.voice_client shortcut.Rapptz2017-04-241-0/+6
|
* [commands] Make when_mentioned always have both mention formats.Rapptz2017-04-241-5/+2
| | | | | This will allow it to work in mobile clients which don't respect the <@!id> format in case of nicknames.
* [commands] Allow loading cogs from folders.Rapptz2017-04-212-9/+10
| | | | | | | | | Internally, instead of using module objects just use the `__module__` attribute which is the same thing. From preliminary testing this seems to work fine with both regular one-file-per-cog approaches and the folder cog approach. Fixes #126.
* [commands] Bot.get_all_emojis no longer exists.Rapptz2017-04-121-2/+2
|
* [commands] Export missing built-in converters.Rapptz2017-04-121-1/+1
|
* [commands] Fix User converter not working with IDs.Rapptz2017-03-271-1/+1
|
* [commands] Add is_owner check and Bot.is_owner.Rapptz2017-03-273-2/+49
|
* [commands] Remove Command.no_pm for commands.guild_only check.Rapptz2017-03-262-15/+22
| | | | | | | This is a breaking change. The original purpose of no_pm has been mainly a legacy aspect. They came from a time before checks were a generalised concept and were never removed. A check is the proper way to do its behaviour.
* More robust cleanup for Client.run.Rapptz2017-03-241-0/+4
| | | | | | | | | This should prevent asyncio.CancelledError from being propagated more and suppressed "Task was destroyed but was pending!" warnings when doing graceful closes outside of using a KeyboardInterrupt. To make clean up a bit more robust, also add signal handlers for POSIX systems.
* [commands] Fix minor spacing issue in Command.signatureRapptz2017-03-211-1/+1
|
* [commands] Add Command.signatureRapptz2017-03-212-31/+40
| | | | This replaces HelpFormatter.get_command_signature for the most part.
* [commands] Add BotBase.get_cog_commands to get all a cog's commands.Rapptz2017-03-211-0/+25
| | | | | Self-explanatory. This should help create help commands for a cog more easily.
* [commands] Change GroupMixin.commands to all_commandsRapptz2017-03-213-20/+25
| | | | | This is a breaking change as GroupMixin.commands now returns a set of unique Command objects.
* [commands] Add Context.me property.Rapptz2017-03-011-0/+5
|
* [commands] Register cog listeners with the name of the attribute.Rapptz2017-02-221-1/+1
|
* [commands] Fix bad logic in command list filtering.Rapptz2017-02-181-1/+1
|
* Make discord.ext a namespace package.Rapptz2017-02-141-12/+0
|