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
I'd like to point out that requests is non-asynchronous code.
Though it's a very good library, it is simply unusable with discord.py. Any requests will block up the event loop/thread and can cause Discord to disconnect the bot in some cases.
I'd strongly recommend using aiohttp instead, and setting a ClientSession to an attribute of your bot object to handle web requests properly.
I'd be glad to PR this.
The text was updated successfully, but these errors were encountered:
I'd like to point out that
requests
is non-asynchronous code.Though it's a very good library, it is simply unusable with
discord.py
. Any requests will block up the event loop/thread and can cause Discord to disconnect the bot in some cases.I'd strongly recommend using
aiohttp
instead, and setting aClientSession
to an attribute of your bot object to handle web requests properly.I'd be glad to PR this.
The text was updated successfully, but these errors were encountered: