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
monbrey
monbrey3y ago
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 all
Spiralio
SpiralioOP3y ago
do you know what the limit is for messages per second?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Spiralio
SpiralioOP3y ago
alright! thanks everyone
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Spiralio
SpiralioOP3y ago
I'm having trouble finding the docs for this, would you mind sending them? thanks
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Spiralio
SpiralioOP3y ago
oh ok thanks!!
souji
souji3y ago
5/5 so you can send 5 in a burst and then need to wait
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server