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ā¢2y ago
Message Not Public
Sign In & Join Server To View
[email protected]
Node v16.12.0
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
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ā¢2y ago
Message Not Public
Sign In & Join Server To View
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ā¢2y ago
Message Not Public
Sign In & Join Server To View
fetch message and edit it
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
yes
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
you eman its better?
But extern I have also a skip command
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
nvm the embed will get updated when new track start (its an event)
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
how can I handle this?
I only fetch the message there and update it. (its a request channel)
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
the embed will get updated when new track started
or how I can create a own timeout when it hits the ratelimit?
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
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ā¢2y ago
Message Not Public
Sign In & Join Server To View
the buttons dont have something to do with the embed
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
but good idea
yeah but not with my code. I mean you only get a "skipped" message when I click the button
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
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ā¢2y ago
Message Not Public
Sign In & Join Server To View
oh thanks
but I cant store a fetched message in a map? and edit the message so often and when I want?
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
ok thank you so much
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
then saving the fetched message is not good you think?
š
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
ok yeah