diff options
| author | Rapptz <[email protected]> | 2020-08-05 08:30:00 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-08-05 08:36:45 -0400 |
| commit | 09f432016ce1c4b7fad3afcd2cd9417fbb892031 (patch) | |
| tree | 20f961c8dd7d249decc461c6c86a0d830b9284e5 | |
| parent | Be defensive in case Discord breaks something with WS URLs again (diff) | |
| download | discord.py-09f432016ce1c4b7fad3afcd2cd9417fbb892031.tar.xz discord.py-09f432016ce1c4b7fad3afcd2cd9417fbb892031.zip | |
[commands] Restart subcommand_passed chain on invoke
Fix #5198
| -rw-r--r-- | discord/ext/commands/core.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index ea67ea71..a1f21563 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -826,6 +826,7 @@ class Command(_BaseCommand): # since we're in a regular command (and not a group) then # the invoked subcommand is None. ctx.invoked_subcommand = None + ctx.subcommand_passed = None injected = hooked_wrapped_callback(self, ctx, self.callback) await injected(*ctx.args, **ctx.kwargs) @@ -1259,6 +1260,7 @@ class Group(GroupMixin, Command): async def invoke(self, ctx): ctx.invoked_subcommand = None + ctx.subcommand_passed = None early_invoke = not self.invoke_without_command if early_invoke: await self.prepare(ctx) |