Getting started help #64
-
I'm pretty new to discordjs. I have a bot that only runs in one discord server and in v12 I made basic reaction roles that were pretty buggy but worked. I've rebuilding my bot for discordjs v13 and wanted to do something more dependable for reactions and found this module. I'm having trouble wrapping my head around where and how to call this and make it work. As I said I'm fairly new and would love to use this, I just have no idea how to implement it. So far I understand adding the different roles into the array, I have mine setup something like this: var {default: ReactionRole} = require('discordjs-reaction-role');
const rulesM = "893943445914279967";
const assignmentsM = "893943445914279969";
const agreedR = "893943445675180040";
const refusedR = "895191949022199828";
const announcerR = "893943445675180038";
const eftR = "893943445675180037";
const valorantR = "893943445675180034";
const rlR = "893943445675180035";
const apexR = "893943445675180036";
const nwR = "893943445675180033";
const agreedE = `✅`;
const notagreedE =`❌`;
const announcerE = "893948862039998504";
const eftE = "893945272282005564";
const valorantE = "893945255366381578";
const rlE = "893945262853206016";
const apexE = "893945245245530132";
const nwE = "893948932453957632";
const reactionRoles = new ReactionRole(this.client, [
{ messageId: rulesM, reaction: agreedE, roleId: agreedR },
{ messageId: rulesM, reaction: notagreedE, roleId: refusedR },
{ messageId: assignmentsM, reaction: announcerE, roleId: announcerR },
{ messageId: assignmentsM, reaction: eftE, roleId: eftR },
{ messageId: assignmentsM, reaction: valorantE, roleId: valorantR },
{ messageId: assignmentsM, reaction: rlE, roleId: rlR },
{ messageId: assignmentsM, reaction: apexE, roleId: apexR },
{ messageId: assignmentsM, reaction: nwE, roleId: nwR },
]); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
This should be enough, the Are you using correctly the partials and the intents? |
Beta Was this translation helpful? Give feedback.
This should be enough, the
reactionRoles
variable is useful to stop the bot, but as long as you spawn the ReactionRole instance it starts to handle reactions if you provide the client.Are you using correctly the partials and the intents?