Issue with reaction role with buttons.

Hello, i have my reaction button role system. Whenever i press gray to get the gray color role, it should remove the aqua role if user has it. So when i tested it, it gives the gray role but doesn't remove the aqua role that i also have. Code: https://sourceb.in/OIix4x0cPY I didn't get any errors.
5 Replies
Frosty
FrostyOP3y ago
My bad I have id putted there. I have d.js v13.7 Thanks whoever changed it.
pat
pat3y ago
remove the arrow function and just put role_color_aqua
Frosty
FrostyOP3y ago
Still nothing let role_color_aqua = interaction.guild.roles.cache.find(role => role.id === "953315741199925299"); It is the actual role. So i have to put .id
if(interaction.member.roles.cache.has(role_color_aqua.id)) return interaction.member.roles.remove(role_color_aqua)
if(interaction.member.roles.cache.has(role_color_aqua.id)) return interaction.member.roles.remove(role_color_aqua)
pat
pat3y ago
yes
Frosty
FrostyOP3y ago
Alright, got it all working, thank you guys!
Want results from more Discord servers?
Add your server