I have a command and the bot responds with a message and adds a reaction to it, if the person who types the command reacts to it they get the role, but I want anyone to be able to react to it as I only want to type it once. it works but only for the person typing the command.
I've tried using other solutions but none other seem to work.
client.on("message", (message) => {
client.on('messageReactionAdd', (reaction, user) => {
if(reaction.emoji.name === "????") {
const guild = client.guilds.get('563851342532313088')
const member = message.member;
console.log(user.id);
const role = guild.roles.find(role => role.name === 'Todosquad');
member.addRole(role)
}
});
Console.log(user.id); prints everyone who reacted but it still won't give them the role.