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?