how i can handle discord ratelimits?

for example my bot shows the current song and when people skip too fast the message dont get updated because ratelimit. But when the ratelimit is over the bot is doing all jobs in the ratelimit queue. How I can change the queue or remove jobs what the bot needs to do?
35 Replies
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
[email protected] Node v16.12.0
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
they click a button and I add a cooldown there too but bots are very slow ith editing messages fast Can I clear the job queue in the ratelimit?
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
not the ratelimit with editing message then the song change 5 times in 10s its too slow with editing Or can I do something with RateLimitQueueFilter
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
fetch message and edit it
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
yes
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
you eman its better? But extern I have also a skip command
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
nvm the embed will get updated when new track start (its an event)
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
how can I handle this? I only fetch the message there and update it. (its a request channel)
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
Kasai
KasaiOPā€¢2y ago
the embed will get updated when new track started or how I can create a own timeout when it hits the ratelimit?
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
I only triggers player.skip() when I click the button. Then a new song starts and there a event what trigger the editing when new song is started
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
the buttons dont have something to do with the embed
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
but good idea yeah but not with my code. I mean you only get a "skipped" message when I click the button
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
or hwo would you do it when you have a music bot where you can see what is playing and how to update and when ok other question: when I fetch a message for example how long its in the cache? or how long I can edit the fecthed message?
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
oh thanks but I cant store a fetched message in a map? and edit the message so often and when I want?
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
ok thank you so much
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
then saving the fetched message is not good you think? šŸ‘
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
Kasai
KasaiOPā€¢2y ago
ok yeah
Want results from more Discord servers?
Add your server