Discord bot very slow at random times
Hi everyone, sorry about the vague title, but here are the details.
I have a bot in a discord server with 40k members. On average, a ping command returns around 200 - 300 ms (calculated by the difference between when the message event is received and when the message is sent). However, at random points, it can take up to 10 seconds for seemingly no reason.
This is what I know:
- The slow down happens when the bot is sending the message, not during the calculations prior
- The bot sends out many messages all the time to log user events
- The bot is not verified
Is it possible that the bot is reaching some sort of message sending limit? Is there any other troubleshooting I should do to prevent this from happening? Thanks!
10 Replies
That does sound like the most likely culprit. Excessive logging is a likely cause of rate limiting
You could switch the logs to a webhook rather than
channel.send
Or reconsider if that much activity needs to be logged at alldo you know what the limit is for messages per second?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
alright! thanks everyone
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I'm having trouble finding the docs for this, would you mind sending them? thanks
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
oh ok thanks!!
5/5 so you can send 5 in a burst and then need to wait
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View