Intery / PomoBot

Discord bot for multi-user coordinated time tracking in a flexible Pomodoro style
MIT License
42 stars 15 forks source link

Implement queuing for message edits #35

Open Intery opened 3 years ago

Intery commented 3 years ago

Issue

PomoBot supports numerous auto-updating messages, including the pinned status message in timer channels, and temporarily live responses to groups and status. Due to the current bursty nature of these requests (sent in batches every n seconds), when managing many guilds PomoBot frequently hits the global ratelimit of the Discord API.

Proposed solution

Implement queuing logic for message edits and frequent requests, and add intelligent spacing between such calls that adapts to the current load.

Intery commented 3 years ago

Adding bug tag and bumping priority since these requests caused the API to temporarily hard-ratelimit the public instance. The relevant features are currently disabled pending implementation of this issue.

Intery commented 3 years ago

The rewrite in 9634af12457280895f69b24bbfc03945ce61e9b5 changes this issue. Message edits are no longer an issue on their own, but combined with frequent voice updates they sometimes cause the bot to hit the global ratelimit again.