mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
[commands] Fix exceptions in HelpCommand
This commit is contained in:
parent
fafc5b13f6
commit
1b70fad5ec
@ -271,7 +271,7 @@ class HelpCommand(HelpCommandCommand, Generic[ContextT]):
|
||||
)
|
||||
|
||||
async def __call__(self, context: ContextT, *args: Any, **kwargs: Any) -> Any:
|
||||
return await self.command_callback(context, *args, **kwargs)
|
||||
return await self._set_context(context, *args, **kwargs)
|
||||
|
||||
async def _set_context(self, context: ContextT, *args: Any, **kwargs: Any) -> Any:
|
||||
_context.set(context)
|
||||
@ -288,7 +288,7 @@ class HelpCommand(HelpCommandCommand, Generic[ContextT]):
|
||||
bot.add_command(self) # type: ignore
|
||||
|
||||
def _remove_from_bot(self, bot: BotBase) -> None:
|
||||
bot.remove_command(self) # type: ignore
|
||||
bot.remove_command(self.name)
|
||||
self._eject_cog()
|
||||
|
||||
async def invoke(self, ctx: ContextT) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user