diff options
| author | Will Tekulve <[email protected]> | 2016-03-30 13:17:44 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-03-31 05:34:51 -0400 |
| commit | 174016c9180135385e6c5eb5ba863d1c39f63801 (patch) | |
| tree | 4d53fbdef9ef9c87f2df24a30ffe7181c0910b43 | |
| parent | Clarify that Client.close is a coroutine. (diff) | |
| download | discord.py-174016c9180135385e6c5eb5ba863d1c39f63801.tar.xz discord.py-174016c9180135385e6c5eb5ba863d1c39f63801.zip | |
[commands] Fix infinite recursion on subgroups without a command.
Just as an FYI, ctx.invoked_subcommand will end up being an instance
of commands.Group!
| -rw-r--r-- | discord/ext/commands/core.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index d0e40f9f..65476044 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -573,7 +573,7 @@ class Group(GroupMixin, Command): injected = inject_context(ctx, self.callback) yield from injected(*ctx.args, **ctx.kwargs) - if ctx.invoked_subcommand: + if trigger and ctx.invoked_subcommand: ctx.invoked_with = trigger yield from ctx.invoked_subcommand.invoke(ctx) elif not early_invoke: |