From 174016c9180135385e6c5eb5ba863d1c39f63801 Mon Sep 17 00:00:00 2001 From: Will Tekulve Date: Wed, 30 Mar 2016 13:17:44 -0400 Subject: [PATCH] [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! --- discord/ext/commands/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index d0e40f9fe..65476044f 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: