2
votes

I have been trying to do this for some time, but to no luck. I am fairly new javascript so am not very competent at it. I essentially want it to work like the reaction roles bot:

It asks which channel to add the reaction roles to, you reply with '#general' for instance.

Then it asks which message you want to add it too, you reply with the '[message ID]' you want the reaction roles added to.

Then it asks which emoji to react with to get the role, you reply with that emoji (also include failsafe in case its a nitro only emoji).

Then it asks for which role to give the person, you reply with something like '@moderator'.

Finally it asks if you want to receive the roll (1) from clicking on it or remove the roll (2) from the user. you reply with either '1' or '2'

Then it will add the reaction to the message and that should be it and it would work.

Any help at all is welcome, even if it only contributes to a small part of this, I am aware after programming on other languages it is never easy to make these things. Thank you everyone!

2

2 Answers

1
votes

The tutorial that Delight posted started me off on a long journey of discovery.

After much research I have found the best way to make it was by following this tutorial: https://www.youtube.com/watch?v=2CCGwsbNaSc&list=PL_cUvD4qzbkxKEHA-_CFmEG0Y2qQCqYFT&index=1

Which helped integrate a Database also.

Also the person making the video was very very good at explaining what they did and walked you through it, allowing me to make all the changes I wanted to with no problems.

I can't possibly explain the stuff as well as this person, so if you want to make a good reaction roles bot please look at that guys tutorials. :)

0
votes

I would use

client.on("messageReactionAdd", reaction => {

});

to detect if someone reacted to a message. Then I would check if the message was a reaction role message and add the role if everything looks ok. You might wanna check out this tutorial on reaction roles.