0x4e49434f4c45 / amcdb

Another Minecraft-Discord Bridge
https://modrinth.com/mod/amcdb
MIT License
4 stars 0 forks source link

Handle Discord rate limiting for channel topic updates #3

Closed 0x4e49434f4c45 closed 1 year ago

0x4e49434f4c45 commented 1 year ago

Right now we send topic updates by default every 5 minutes 30 seconds. This is only sometimes enough to avoid rate limiting. Need to handle the Discord Retry-After response header to determine the actual time to wait before the next update.

0x4e49434f4c45 commented 1 year ago

JDA does not expose response header information, and the X-RateLimit-* headers return completely useless and incorrect information for topic updates anyway.

Disabled JDA queueing (#8) to at least prevent 429 errors from becoming self-perpetuating as JDA tries to re-send old rate-limited requests.