Skip to content

Commit 34cbcb0

Browse files
committed
Added docs
1 parent b8a115d commit 34cbcb0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

discord_slash/client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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():

0 commit comments

Comments
 (0)