aboutsummaryrefslogtreecommitdiff
path: root/discord/ext
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* [commands] Forbid passing a string to aliases in Command.Rapptz2017-12-291-0/+4
| | | | Fixes #974
* Add support for animated emoji to commands ext EmojiConverterJoshua Butt2017-12-221-1/+1
|
* [commands] Fix minor spelling mistakeS Stewart2017-11-201-1/+1
|
* [commands] Minor speed-up for the BucketType.guild case.Rapptz2017-10-081-1/+1
| | | | | | | | None case: 344ns ± 24.4ns -> 49.9ns ± 1.39ns Valid case: 128ns ± 2.76ns -> 42.7ns ± 0.459ns
* [commands] Make CooldownMapping.get_bucket take Message instead.Rapptz2017-10-082-7/+6
| | | | | Requiring a full blown Context might be a bit overkill considering we only use a single attribute from it.
* [commands] Split Cooldown state processing to two different functions.MysterialPy2017-10-032-8/+34
| | | | | This allows us to check if we are rate limited without creating a new cool-down window for the command.
* [commands] Add CategoryChannelConverterRapptz2017-09-131-1/+42
|
* [commands] Fix NameError when given an invalid prefix.Rapptz2017-09-121-1/+1
| | | | Closes #775
* [commands] Have (bot_)has_permissions provide better failure responsesReinaSakuraba2017-08-301-2/+21
|
* [commands] Add MissingPermissions and BotMissingPermissionsReinaSakuraba2017-08-301-1/+43
|
* [commands] Add CooldownMapping.from_cooldown factory classmethod.Rapptz2017-08-271-0/+4
|
* [commands] Export cooldown classes as well.Rapptz2017-08-271-1/+1
|
* [commands] Raise when an invalid prefix is given.Rapptz2017-08-151-5/+18
| | | | Fixes #712