K
K
kisman20002020-07-22 21:35:43
Node.js
kisman2000, 2020-07-22 21:35:43

role.setcolor() code not working in discord.js v12?

in the console there is an error that it is for v11, I don’t know how to change it, help me if I’m stupid, sorry)

bot.on('message', msg => {
    if(msg.content == '@renk') {
    const role = msg.guild.roles.resolve('735498594135572562')
    role.setColor('#0xff4908');       
}});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-07-22
@Alexandre888

As far as I understand, you want to make a role color change on command.
why do you need msg.guild.roles.resolveif you can usemsg.guild.roles.cache.get("ID")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question