Want to add a role when reacting to a message discord.js

MilkyBob Source

I want to have someone get a role when they react to a message. I'm not sure how to start.

javascriptnode.jsdiscord.js

Answers

answered 3 months ago Evan #1

At a high level you would want to listen to the messageReactionAdd event and then after parsing the reaction, add whoever who reacted to a user role with addMemberToRole()

Event: https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-messageReactionAdd

Add member: http://discordjs.readthedocs.io/en/latest/docs_client.html#addmembertorole-member-role-callback

comments powered by Disqus