object-Object / Yot

A moderation and utility Discord bot, written in Lua.
MIT License
4 stars 1 forks source link

Ratelimits for $move #10

Open object-Object opened 4 years ago

object-Object commented 4 years ago

https://github.com/discord/discord-api-docs/issues/367 There should be messages in the bot about this. Need to figure out how exactly the ratelimit works.

object-Object commented 4 years ago

ratelimits: 5/2s 30/60s

x <= 5: send all at once (time: 1 s) x >= 6 and x <= 30: send 2 every 1s (time: x/2 s) x > 30: send 1 every 2s (time: 2x s)

update the time remaining update it if a ratelimit is hit and a big delay will happen