Answer the question
In order to leave comments, you need to log in
How to fix a command that makes a rainbow role?
module.exports.run = async(bot, message, args) => {
if(!message.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return;
var colors = ['#FF0000','#FF7F00','#FFFF00','#0000FF','4B0082','#8F00FF'];
for(let i = 0; i<= colors.length;i++){
var role = message.guild.roles.find(role => role.name === "Welcome");
setInterval(() => {
role.edit({
color: colors[i]
})
}, 5000);
}
}
module.exports.help = {
name: 'rainbowrole'
}
Answer the question
In order to leave comments, you need to log in
Discord simply doesn't allow people/bots to change roles if they send too many role change requests.
You can use different accounts, just change them periodically, but it’s better, of course, not to violate the terms of use.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question