File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,22 @@ def __init__(self,
4747 self .has_listener = True
4848
4949 def remove (self ):
50+ """
51+ Removes :func:`on_socket_response` event listener from discord.py Client.
52+
53+ .. note::
54+ This only works if it is :class:`discord.ext.commands.Bot` or
55+ :class:`discord.ext.commands.AutoShardedBot`.
56+ """
57+ if not self .has_listener :
58+ return
5059 self ._discord .remove_listener (self .on_socket_response )
5160
5261 async def register_all_commands (self ):
62+ """
63+ Registers all slash commands except subcommands to Discord API.\n
64+ If ``auto_register`` is ``True``, then this will be automatically called.
65+ """
5366 await self ._discord .wait_until_ready () # In case commands are still not registered to SlashCommand.
5467 self .logger .info ("Registering commands..." )
5568 for x in self .commands .keys ():
You can’t perform that action at this time.
0 commit comments