#Channel name changing rate limits
1 messages · Page 1 of 1 (latest)
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.
how can i check the rate limit error
i tried try.....catch and i didnt receive any thing in console on await channel.setName
client.rest.on('rateLimited' event.
https://discord.js.org/docs/packages/rest/1.7.1/RestEvents:Interface#rateLimited
F5 in my keyboard change brightness
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.
nothing happen else than changing brightness
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?
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"
I want to send the embed and change perm and database olny🙂
right but you should still inform the user
and you shouldn't update those things because they weren't changed on Discord's side
i saw a bot that do this without inform🙂
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
would be easy if you used Sapphire cough cough https://www.sapphirejs.dev/docs/Guide/preconditions/command-cooldown
the bot get limited like my bot but the new that that bot send the embed and change perm and change its database
Look the difference
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
I made it thx