#Channel name changing rate limits

1 messages · Page 1 of 1 (latest)

naive robinBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

placid turret
#

Check for rate limit error events and replay events, or just limit the user from performing the action so many times that your bot gets rate limited.

north linden
#

how can i check the rate limit error
i tried try.....catch and i didnt receive any thing in console on await channel.setName

placid turret
north linden
placid turret
#

Ctrl + F5 to refresh cache

north linden
#

F5 in my keyboard change brightness

placid turret
#

Ctrl + Fn + F5 then

#

Surely you've used your Fn key before

#

Or use the Developer Tools by pressing F12. Once the chrome dev tools are open, just right click on the refresh button and a menu will drop down. This menu gives you the option of doing a hard reload.

north linden
#

nothing happen else than changing brightnessemoji_56

#
client.rest.on('rateLimit', (rateLimitInfo) => {

  if (rateLimitInfo.route.includes('/channels/{channelId}')) {
    console.log('Rate limit encountered when updating channel name. Operation aborted.');
    return;
  }
});

this is the code that is should use?

placid turret
#

channelId should be replaced with the actual channel id for starters

#

but you are still rate limited so you'll probably want to do something more than just logging

#

if all you're gonna do is logging then why bother with it at all, just let your bot be rate limited.

#

You should inform the user with a message along the lines of "I got rate limited, try again in a little bit"

north linden
#

I want to send the embed and change perm and database olny🙂

placid turret
#

right but you should still inform the user

#

and you shouldn't update those things because they weren't changed on Discord's side

north linden
placid turret
#

shrug, whatever you say

#

IMHO you should make it so your bot doesn't get rate limited in the first place by restricting commands behind timeouts but you do you

north linden
#

the bot get limited like my bot but the new that that bot send the embed and change perm and change its databaseR3B_

#

the ticket tool should when not get rate limits change channel name to
closed-${number}

#

@placid turret

#

bro the thing that i want to make when the bot is rate limit make all things expect changing channel name

north linden
#

I made it thx