aboutsummaryrefslogtreecommitdiff
path: root/discord/ext
Commit message (Collapse)AuthorAgeFilesLines
* [commands] Add support for IDs in the role related checks.Xua2018-11-241-17/+25
| | | | | | | | | This affects: * commands.has_role * commands.has_any_role * commands.bot_has_role * commands.bot_has_any_role
* Add channel category cooldown bucket typeDice2018-11-242-5/+9
|
* bot.unload_extension: also allow events with no modulebmintz2018-11-241-6/+4
| | | | | | | | | | It turns out that events created in an eval command also cause the issue described in #1506. Ensure that events we remove are part of a module as well. Also performs minor comment maintenance ("x", "first y", "then z") -> ("x", "y", "z")
* [lint] Fix import orderHornwitser2018-11-243-4/+7
| | | | | Reorder imports to be consistenly grouped by standard library, third party library, and local modules in that order thoughout the library.
* [commands] Remove duplicated quote entriesHornwitser2018-11-241-2/+0
| | | | | Remove two duplicated entries from the quote mapping in commands.view. These were introduced at the creation of this mapping in ea061ef.
* [lint] Remove redundant paranthesisHornwitser2018-11-243-9/+9
| | | | | Remove redundant parenthisis around await expressions. Left over from f25091ef.
* [lint] Rename exception variables to excHornwitser2018-11-243-14/+14
| | | | | Use the more explicit (and common) exc instead of e as the variable holding the exception in except handlers.
* [lint] Remove redundant exception variablesHornwitser2018-11-241-5/+5
| | | | | | Use bare raise statement when reraising the exception that occured, and remove unused exception variables. Also remove a pointless exception handler in discord.opus.
* [lint] Limit unneccessarily broad except clausesHornwitser2018-11-242-4/+4
| | | | Add exception qualifier(s) to bare except clauses swallowing exceptions.
* Revert "Rework documentation to not duplicate inherited members."Rapptz2018-10-111-3/+1
| | | | This reverts commit 96981210b3415e15446db0b702b07fef25c8b680.
* [commands] Add call_once keyword-only parameter for Bot.remove_checkRapptz2018-10-111-7/+8
| | | | | Technically a breaking change. This is to be a parallel with the Bot.add_check interface.
* Rework documentation to not duplicate inherited members.Rapptz2018-10-031-1/+3
| | | | This will probably be reverted in 1 week.
* [commands] Fix NameError in clean_content converterRapptz2018-09-251-1/+1
|
* Change internal role storage in Guild to a dict instead of a list.Rapptz2018-09-241-4/+7
| | | | | | | | | | | | | | | | This adds the following APIs: * Guild.get_role This removes the following APIs: * Guild.role_hierarchy To compensate for the removed APIs, Guild.roles is now a sorted list based on hierarchy. The first element will always be the @everyone role. This speeds up access at the cost of some memory, theoretically.
* [commands] Fix up Greedy documentation a bit.Rapptz2018-09-241-2/+2
|
* [commands] Add commands.Greedy converter and documentation.Rapptz2018-09-242-2/+79
| | | | | This allows for greedy "consume until you can't" behaviour similar to typing.Optional but for lists.
* [commands] Allow for backtracking parsing with typing.OptionalRapptz2018-09-231-0/+10
| | | | | | | | | | Original code by zephyrkul. This new parsing mode allows for backtracking in case of failure when a typing.Union[..., NoneType] or a typing.Optional[...] is used. This means that if a type would fail to parse, the view is undo'd to a previous state, passing the default parameter to the callback, and then continuing on the next parameter as if nothing had happened.
* [commands] Properly parse bool when inside a typing.Unionzephyrkul2018-09-201-3/+3
|
* Correct ClientException message raised in invocation hooks.MusicOnline2018-09-202-4/+4
| | | | For when the hooks are not coroutines.
* Change docstrings to raw-stringsBeatButton2018-09-144-11/+11
|
* [commands] Prepend mention prefixes in commands.when_mentioned_orzephyrkul2018-08-281-1/+1
|
* Fix typo in core.Command docstringSilicalNZ2018-08-241-1/+1
|
* [commands] Use eval instead of get_type_hints to resolve typehintsRapptz2018-08-221-14/+19
| | | | | | | | | | | The previous usage of `typing.get_type_hints` caused issues as it would incorrectly decide to convert annotations into their equivalent `typing` form -- which is not what we want to happen here. Due to some use-cases about how setting `Command.callback` work and the amount of moving parts that have changed due to this patch, it is probably better to refactor the way it is set so users can have this use-case handled transparently for them.
* Bot.unload_extension: don't remove commands from no moduleBen Mintz2018-08-221-0/+2
| | | Fixes unload_extension in the case of a command added via eval
* Add support for converters working with PEP-563Bryan Forbes2018-08-221-0/+12
|
* [lint] Fix incorrect and inconsistent whitespaceHornwitser2018-08-226-12/+16
| | | | Adjust whitespace to be consistent with the rest of the library.
* [lint] Remove unnecessary lambdasHornwitser2018-08-221-1/+1
| | | | Lambdas of the form `lambda x: func(x)` are redundant.
* [lint] Remove unused variablesHornwitser2018-08-221-1/+1
| | | | Left over from various refactoring and rewrites.
* [lint] Remove unused importsHornwitser2018-08-224-5/+1
| | | | Left over from various refactoring and rewrites.
* [commands] Handle nick mentions in HelpFormatterMichael H2018-08-221-2/+2
| | | | | Modifies the help formatter to handle nicknamed bot users for mentions in clean_prefix
* [commands] Ignore bots from Bot.process_commands by default.Rapptz2018-08-221-1/+7
|
* [commands] Added BucketType.members for cooldownsClement2018-08-222-1/+5
|
* [commands] Fix broken handling of keyword only parameters.Rapptz2018-07-211-1/+1
| | | | Had a missing `param` argument in the new `do_conversion` code.
* [commands] Fix typing.Union converters for 3.7Rapptz2018-07-201-12/+17
| | | | Guido please don't break this
* [commands] Make ConversionError have the original error as an attributeRapptz2018-07-202-2/+6
|
* [commands] Add support for typing.Union as a converterRapptz2018-07-202-5/+55
|
* [commands] raise ConversionError on Converter errorkhazhyk2018-07-202-26/+44
| | | | | | This assumes that a Converter class raising non-CommandError is a programmer error. Makes this type of error easier to disambiguate from a generic BadArgument.
* [commands] Change command_prefix behaviourHornwitser2018-06-291-17/+53
| | | | | | | | Change the behaviour of handling iterable command_prefix types to not silently ignore falsy prefixes and unify behaviour for all iterable types. Add special handling of a possible TypeError in both get_prefix and get_context for when the prefix is a different type from what is expected.
* Fix case insensitive command removalHarmon2018-06-211-0/+3
|
* Fix Bot.get_prefix second parameter breaking.Rapptz2018-06-101-1/+1
|
* Drop support for Python 3.4 and make minimum version 3.5.2.Rapptz2018-06-105-167/+119
|
* [commands] Don't handle single quotes.Rapptz2018-03-201-2/+0
|
* [commands] Minor optimisations to unicode quote handling.Rapptz2018-03-061-3/+6
|
* [commands] Added handling for unicode quotesb-hodges2018-03-061-14/+43
|
* [commands] Add ability to have case insensitive commands.Rapptz2018-03-062-1/+28
| | | | | | | | | | This is powered by a dict-like class for the people who want to opt-in to the performance downgrade for usability for majority English speaking users. Since it is slower than the regular dict due to the excessive calls to str.lower along with the possibilities of gotchas for other languages outside of English, this is kept as False for the default case.
* [commands] Allow builtin unbound method convertersEli2018-02-101-2/+7
|
* Change PartialReactionEmoji to PartialEmoji, add a PartialEmojiConverterGorialis2018-01-061-2/+21
|
* Add intersphinxTobotimus2018-01-066-47/+47
|
* [commands] Fix MissingRequiredArgument param handlingkhazhyk2018-01-061-2/+2
| | | | | Documentation was incorrect, and we were throwing away the param we were passing.
* [commands] Document that can_run can raise.Rapptz2017-12-291-0/+6
|