0
votes

I'm trying to make a bot, where it automatically updates some voice channel names, so they'll work as statistics for a small game.

If I make a new voice channel, it works with that for two name changes, and then it won't change it anymore, no matter if I restart the bot. It's an issue, as this should continuously update it 24/7.

            if (message.channel.id === "718601383527317514") {
            message.guild.channels.get("718930156852477993").setName("SelfMade - " + infected + " Infected");
            message.channel.send("Updated!");
            }

'infected' is a variable I retrieve from a file, but I've tried removing that, so it changes the name of the voice channel to just a string, so I know it's not because of the variable.

How do I fix this?

1
Are there name changes appearing in the audit log on discord? Also, is there any errors related to rate limiting or anything else? - Rodentman87
@Rodentman87 Yes, the first two name changes appear in the audit log, but then it just shows nothing, as the bot didn't even try to change it anymore. I can't see why it would be the bot's fault - why would it just stop changing the name after two times? Not sure if Discord has some kind of cooldown. - SelfMade
Are there any errors in the bot's log or anything? Also, is this function actually being called more than twice? - Rodentman87
@Rodentman87 Nope, no errors or anything that might show a solution. I mean, the bot is supposed to change the name of the server each time someone writes a specific message in a channel, and I've tried writing that message a lot of times with intervals in between as well, but no luck after exactly TWO changes. - SelfMade
This sounds like it's a rate limit issue, try slowing down the speed with which the channel name is updated. - Rodentman87

1 Answers

0
votes

You are getting Rate - Limited because you can change a Channelname 2 times in under 10 minutes.

For more informations go: Here

There get you information how to get more information about, how to avoid it.

Source ( + own experience)