discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.96k stars 1.26k forks source link

API throttle Limitations #540

Closed batkins62 closed 6 years ago

batkins62 commented 6 years ago

Weve coded a request to post a message in a channel when a twitch automod message happens. it was fine when our chat was 1000 people, but when we grew to 5000, the bot doesnt post the messages in the discord chan. is there a throttle limit? if so how do we go about requesting more

Fabricio20 commented 6 years ago

Discord has ratelimits, which you should follow, they won't increase the ratelimit for someone unless their bot fits in a very specific criteria. The documentation on ratelimits is available on https://discordapp.com/developers/docs/topics/rate-limits but basically: X-RateLimit-Reset header will tell you how much time you have to wait before sending another message.

msciotti commented 6 years ago

Yes, you need to be able to follow rate limits properly, as posted above. If you're using a bot, the library you chose is most likely already handling them, which is why the bot isn't posting messages - it's following the rate limits properly.

If you are using something like a webhook to post log messages into a Discord channel and twitch automod actions happen that frequently, I would caution you to find another solution, because that is not what webhooks are intended to do.