Skip to content Skip to sidebar Skip to footer

How To Add A Role With An Id That Is Saved In An Json File Discord.js V12?

I'm making a warn command and I've run into a problem with the role giving. First, I have a command that sets the warned role for the guild. It reacts to &setwarnedrole {role I

Solution 1:

Ok, I found the mistake. I was setting the role in &warn to message.guild.roles.cache.get(`${warnedRoleList[guildID]}`);, but it is supposed to be message.guild.roles.cache.get(`${warnedRoleList[guildID].warnedRoleList}`);. Case closed.


Post a Comment for "How To Add A Role With An Id That Is Saved In An Json File Discord.js V12?"