| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This affects:
* commands.has_role
* commands.has_any_role
* commands.bot_has_role
* commands.bot_has_any_role
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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")
|
| |
|
|
|
| |
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
|
| |
|
|
|
| |
Remove two duplicated entries from the quote mapping in commands.view.
These were introduced at the creation of this mapping in ea061ef.
|
| |
|
|
|
| |
Remove redundant parenthisis around await expressions. Left over from
f25091ef.
|
| |
|
|
|
| |
Use the more explicit (and common) exc instead of e as the variable
holding the exception in except handlers.
|
| |
|
|
|
|
| |
Use bare raise statement when reraising the exception that occured, and
remove unused exception variables. Also remove a pointless exception
handler in discord.opus.
|
| |
|
|
| |
Add exception qualifier(s) to bare except clauses swallowing exceptions.
|
| |
|
|
| |
This reverts commit 96981210b3415e15446db0b702b07fef25c8b680.
|
| |
|
|
|
| |
Technically a breaking change. This is to be a parallel with the
Bot.add_check interface.
|
| |
|
|
| |
This will probably be reverted in 1 week.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
This allows for greedy "consume until you can't" behaviour similar to
typing.Optional but for lists.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
For when the hooks are not coroutines.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
Fixes unload_extension in the case of a command added via eval
|
| | |
|
| |
|
|
| |
Adjust whitespace to be consistent with the rest of the library.
|
| |
|
|
| |
Lambdas of the form `lambda x: func(x)` are redundant.
|
| |
|
|
| |
Left over from various refactoring and rewrites.
|
| |
|
|
| |
Left over from various refactoring and rewrites.
|
| |
|
|
|
| |
Modifies the help formatter to handle nicknamed bot users for
mentions in clean_prefix
|
| | |
|
| | |
|
| |
|
|
| |
Had a missing `param` argument in the new `do_conversion` code.
|
| |
|
|
| |
Guido please don't break this
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Documentation was incorrect, and we were throwing
away the param we were passing.
|
| | |
|