Skip to content

Commit a2a5dd4

Browse files
committed
Reverted discord.Client event adding method
1 parent b625f70 commit a2a5dd4

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

discord_slash/client.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,8 @@ def __init__(self,
5858
self._discord.loop.create_task(self.sync_all_commands(delete_from_unused_guilds))
5959

6060
if not isinstance(client, commands.Bot) and not isinstance(client, commands.AutoShardedBot) and not override_type:
61-
self.logger.info("Detected discord.Client! It is highly recommended to use `commands.Bot`.")
62-
original_sock_event = self._discord.on_socket_response if hasattr(self._discord, "on_socket_response") else lambda x: None
63-
64-
def wrap(*args):
65-
original_sock_event(*args)
66-
self.on_socket_response(*args)
67-
68-
self._discord.on_socket_response = wrap
61+
self.logger.warning("Detected discord.Client! It is highly recommended to use `commands.Bot`. Do not add any `on_socket_response` event.")
62+
self._discord.on_socket_response = self.on_socket_response
6963
self.has_listener = False
7064
else:
7165
if not hasattr(self._discord, 'slash'):

0 commit comments

Comments
 (0)