mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 00:55:19 +00:00
[commands] Rework help command to avoid a deepcopy on invoke
This commit is contained in:
@ -354,6 +354,7 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
||||
"""
|
||||
from .core import Group, Command, wrap_callback
|
||||
from .errors import CommandError
|
||||
from .help import _context
|
||||
|
||||
bot = self.bot
|
||||
cmd = bot.help_command
|
||||
@ -361,8 +362,8 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
||||
if cmd is None:
|
||||
return None
|
||||
|
||||
cmd = cmd.copy()
|
||||
cmd.context = self # type: ignore
|
||||
_context.set(self)
|
||||
|
||||
if len(args) == 0:
|
||||
await cmd.prepare_help_command(self, None)
|
||||
mapping = cmd.get_bot_mapping()
|
||||
|
Reference in New Issue
Block a user