mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 00:55:19 +00:00
[commands] Revert back to older help command implementation
The newer implementation did not play nicely with spawned tasks and accessing HelpCommand.context, which was a frequent pain point when writing paginated help commands.
This commit is contained in:
@ -354,7 +354,6 @@ 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
|
||||
@ -362,7 +361,8 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
||||
if cmd is None:
|
||||
return None
|
||||
|
||||
_context.set(self)
|
||||
cmd = cmd.copy()
|
||||
cmd.context = self
|
||||
|
||||
if len(args) == 0:
|
||||
await cmd.prepare_help_command(self, None)
|
||||
|
Reference in New Issue
Block a user