mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
[commands] Fix HelpCommand.invoked_with when used in events.
This commit is contained in:
parent
239d430539
commit
ee81f0614e
@ -330,9 +330,10 @@ class HelpCommand:
|
||||
The command name that triggered this invocation.
|
||||
"""
|
||||
command_name = self._command_impl.name
|
||||
if self.context is None or self.context.command.qualified_name != command_name:
|
||||
ctx = self.context
|
||||
if ctx is None or or ctx.command is None or ctx.command.qualified_name != command_name:
|
||||
return command_name
|
||||
return self.context.invoked_with
|
||||
return ctx.invoked_with
|
||||
|
||||
def get_command_signature(self, command):
|
||||
"""Retrieves the signature portion of the help page.
|
||||
|
Loading…
x
Reference in New Issue
Block a user