Fixing ratelimit warnings #2

Closed
opened 2026-01-06 00:27:43 +01:00 by csxkdv · 1 comment
Owner
  • Upon loading the bot again if you have +6 commands, all commands get registered with no exception. This triggers a ratelimit and a warning:
    • [RATELIMIT : main @ 2026-01-05 20:18:36.308] RL bucket depletion detected! Date: Mon, 05 Jan 2026 23:18:36 GMT Reset: 1767655134.002
    • [WARN : main @ 2026-01-05 20:18:36.308] Locking RL mutex (key: [:applications_aid_guilds_gid_commands, "1428047160712368262"]) for 17.858 seconds pre-emptively

Find a way to only register newly added commands. Previous commands should not load/register.

- Upon loading the bot again if you have +6 commands, all commands get registered with no exception. This triggers a ratelimit and a warning: - `[RATELIMIT : main @ 2026-01-05 20:18:36.308] RL bucket depletion detected! Date: Mon, 05 Jan 2026 23:18:36 GMT Reset: 1767655134.002` - `[WARN : main @ 2026-01-05 20:18:36.308] Locking RL mutex (key: [:applications_aid_guilds_gid_commands, "1428047160712368262"]) for 17.858 seconds pre-emptively` Find a way to only register newly added commands. Previous commands should not load/register.
csxkdv added this to the FrugalityBot - Code project 2026-01-06 01:07:00 +01:00
Author
Owner

Fixed by adding sleep(amount_of_seconds), where amount_of_seconds can be an Integer, or a Float.

https://apidock.com/ruby/v2_5_5/Kernel/sleep!

Fixed by adding `sleep(amount_of_seconds)`, where `amount_of_seconds` can be an Integer, or a Float. https://apidock.com/ruby/v2_5_5/Kernel/sleep!
csxkdv moved this to Approved in FrugalityBot - Code on 2026-01-06 17:24:20 +01:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: csxkdv/FrugalityBot#2