File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,15 @@ def __init__(self,
5050 elif self .auto_delete :
5151 self ._discord .loop .create_task (self .delete_unused_commands ())
5252
53- if not isinstance (client , commands .Bot ) and not isinstance (client ,
54- commands .AutoShardedBot ) and not override_type :
55- self .logger .info ("Detected discord.Client! Overriding on_socket_response." )
56- self ._discord .on_socket_response = self .on_socket_response
53+ if not isinstance (client , commands .Bot ) and not isinstance (client , commands .AutoShardedBot ) and not override_type :
54+ self .logger .info ("Detected discord.Client! It is highly recommended to use `commands.Bot`." )
55+ original_sock_event = self ._discord .on_socket_response
56+
57+ def wrap (* args ):
58+ original_sock_event (* args )
59+ self .on_socket_response (* args )
60+
61+ self ._discord .on_socket_response = wrap
5762 self .has_listener = False
5863 else :
5964 if not hasattr (self ._discord , 'slash' ):
You can’t perform that action at this time.
0 commit comments