Browse Source

[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!
pull/144/head
Will Tekulve 9 years ago
committed by Rapptz
parent
commit
174016c918
  1. 2
      discord/ext/commands/core.py

2
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:

Loading…
Cancel
Save