-
Notifications
You must be signed in to change notification settings - Fork 43
Use add_listener function instead of on_socket_response #45
Comments
Fantastic solution to a problem I've passed the passt 7 and a half hours on ! |
That would be nice |
But what if the bot is a client object |
Oof I don't know... |
Implemented on 0.5.2.4 |
In this line, I think the intention is add a socket_response listener
https://github.com/kiki7000/discord.py-components/blob/49dafb8f5efa84c655649608b7ffd157b86d0040/discord_components/client.py#L86
However, an unwanted side effect of this way of adding a listener is that it overwrites any other on_socket_response listener function already defined on the bot. I think a better solution would be to use discord.py's Bot.add_listener function:
This listener will still be called even if some other library/user adds 'socket_response' listeners, and also won't replace existing on_socket_response methods.
The text was updated successfully, but these errors were encountered: