diff options
| author | Rapptz <[email protected]> | 2019-04-29 00:08:08 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-04-29 00:08:08 -0400 |
| commit | 05d4f7f9620ef33635d6ac965b26528e09cdaf5b (patch) | |
| tree | bf5a9dd528d31a18b164e64da09039a68265e800 | |
| parent | [commands] Copy HelpCommand instances to prevent race conditions. (diff) | |
| download | discord.py-05d4f7f9620ef33635d6ac965b26528e09cdaf5b.tar.xz discord.py-05d4f7f9620ef33635d6ac965b26528e09cdaf5b.zip | |
[commands] Fix Context.send_help to work with the copied HelpCommand
| -rw-r--r-- | discord/ext/commands/context.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index edce974a..e988eb3d 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -261,6 +261,8 @@ class Context(discord.abc.Messageable): if cmd is None: return None + cmd = cmd.copy() + cmd.context = self if len(args) == 0: await cmd.prepare_help_command(self, None) mapping = cmd.get_bot_mapping() |