diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 163bc2694..d06fbd8bf 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -297,6 +297,11 @@ class _HelpCommandImpl(Command): # Revert `on_error` to use the original one in case of race conditions self.on_error = self._injected.on_help_command_error + def update(self, **kwargs: Any) -> None: + cog = self.cog + self.__init__(self._original, **dict(self.__original_kwargs__, **kwargs)) + self.cog = cog + class HelpCommand: r"""The base implementation for help command formatting. @@ -377,9 +382,8 @@ class HelpCommand: return obj def _add_to_bot(self, bot: BotBase) -> None: - command = _HelpCommandImpl(self, **self.command_attrs) - bot.add_command(command) - self._command_impl = command + self._command_impl.update(**self.command_attrs) + bot.add_command(self._command_impl) def _remove_from_bot(self, bot: BotBase) -> None: bot.remove_command(self._command_impl.name)