| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
| |
Technically a breaking change, however this interface was not
documented or guaranteed to exist.
|
| |
|
|
|
|
|
|
| |
This causes them to be raised from a new exception named
ArgumentParsingError with 3 children for ease with i18n. This is
technically a breaking change since it no longer derives from
BadArgument, though catching UserInputError will prevent this change
from affecting the user.
|
| |
|
| |
:)
|
| | |
|
| |
|
|
| |
Change Greedy to `[a]...` | `[a=1]...`
|
| |
|
|
| |
Fixes #1944
|
| | |
|
| |
|
|
| |
Should make this error easier to catch rather than silent failure.
|
| |
|
|
| |
Fix #1926
|
| |
|
|
| |
Fixes #1920
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug was kind of a long one to figure out, as per #1918 documents
the issue had to do with subcommands but the actual adventure in
finding this one was a long one.
The first problem was that Command.cog was for some reason None, which
indicated that a copy was happening somewhere along the way. After some
fiddling I discovered that due to the copies of `Cog.__cog_commands__`
the groups pointed to out-dated versions that got overriden by the new
copies.
The first attempt at fixing this was straightforward -- just remove the
subcommand from the parent and replace it with the newer reference that
we just received. However, this ended up not working due to a strange
mystery where the subcommand being invoked was neither the original
copy nor the new copy residing in `Cog.__cog_commands__`.
Some more investigation later pointed out to me that a copy occurs
during the `Group.copy` stage which calls `Command.copy` for all its
subcommands. After spotting this out I had realised where the
discrepancy comes from. As it turns out, the subcommand copy that was
being invoked was actually a stale one created from `Group.copy`.
The question remained, how come that one was being called? The problem
stemmed from the fact that when the subcommand was copied, the parent
reference pointed to the old parent. Since the old parent was the one
that was getting the new reference, it went practically untouched. This
is because the calling code fetches the child from the parent and the
old parent is nowhere in the call chain.
To fix this issue we needed to update the parent reference, and in
order to do that a temporary lookup table is required pointing to the
latest copies that we have made.
Thus ends a 3.5 hour bug hunting adventure.
|
| |
|
|
| |
Now they're just explicitly copied.
|
| | |
|
| |
|
|
|
| |
Previously they were outdated copies, this updates the copies to the
ones that are actually injected.
|
| | |
|
| |
|
|
| |
This fixes the issue of error handlers not applying.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
removed fixed strings "Commands:" and help page ending note.
and added properties modify these strings.
default behavior is not changed. fix #1886
|
| |
|
|
|
| |
add _string_width function to util. Changed string width calculate
function from len() to util function _string_width().
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Make Greedy swallow conversion errors and return the default if there
are no convertible args
|
| |
|
|
|
|
| |
This allows for easier "mock" context objects, for those who use
converters as utility functions outside of commands, and it's more
straightforward with the rest of the file.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|