Discord Reaction Role
Discord Reaction Role is a powerful Node.js module that allows you to easily create reactions roles !
Installation
npm i discord-reaction-role
Exemple
Lunch of the module
const Discord = client = settings = prefix: "g!" token: "Your Discord Token"; // Requires Manager from discord-reaction-roleconst ReactionRoleManager = ;// Starts updating currents reaction rolesconst manager = client storage: "./reaction-role.json";// We now have a reactionRoleManager property to access the manager everywhere!clientreactionRoleManager = manager; client; client;
- client: the discord client (your discord bot instance)
- options.storage: the json file that will be used to store reaction roles
Start
clientreactionRoleManagerstart messageID: '706857963188387903' channel: messagechannel reaction: '✅' role: messageguildrolescache
Fetch the reaction role
// The list of all the reaction roles let allReactionRoles = clientreactionRoleManagerreactionRole; // [ {ReactionRole}, {ReactionRole} ] // The list of all the giveaways on the server with ID "1909282092" let onServer = clientreactionRoleManagerreactionRole;