mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
avoid issue with not having before_invoke called (#4129)
This commit is contained in:
parent
39ae4a3b58
commit
29543ed118
@ -809,7 +809,9 @@ class Group(GroupMixin, Command, CogGroupMixin, DPYGroup):
|
|||||||
if self.autohelp and not self.invoke_without_command:
|
if self.autohelp and not self.invoke_without_command:
|
||||||
if not await self.can_run(ctx, change_permission_state=True):
|
if not await self.can_run(ctx, change_permission_state=True):
|
||||||
raise CheckFailure()
|
raise CheckFailure()
|
||||||
await ctx.send_help()
|
# This ordering prevents sending help before checking `before_invoke` hooks
|
||||||
|
await super().invoke(ctx)
|
||||||
|
return await ctx.send_help()
|
||||||
elif self.invoke_without_command:
|
elif self.invoke_without_command:
|
||||||
# So invoke_without_command when a subcommand of this group is invoked
|
# So invoke_without_command when a subcommand of this group is invoked
|
||||||
# will skip the the invokation of *this* command. However, because of
|
# will skip the the invokation of *this* command. However, because of
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user