You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands, callbacks aren't passed the bot or client. I hadn't considered that it was necessary for something like file upload, but now that you mention it, the functionality should certainly be added.
My main concern is preserving API compatibility with existing callbacks. Introducing a client parameter would break compatibility, unless some cleverness was used. Perhaps attempting a 3 parameter callback with a try statement and on failure falling back to 2 parameters? I'll give it some thought and provide updates here.
Is there a way to access the bot.client variable from the callback functions somehow? If so, it would be useful to document it.
If not, it should be made possible. Perhaps add the bot or the client as callback parameter?
Client is required for example for file upload.
The text was updated successfully, but these errors were encountered: