discord-role-react
v0.0.5
Published
Create beautiful role selection message !
Downloads
7
Maintainers
Readme
discord-role-react is a package that allow you to easily create buttons to add roles.
Install
npm install discord-role-react
Setup
const discord = require('discord.js');
const client = new discord.Client();
require('discord-buttons')(client); // must be below your discord.Client()
require('discord-role-react')(client); // must be below your discord.Client()
You absolutly need to require both discord-buttons and discord-role-react !
Method
channel.createReactRoleMessage(content/embed, Setuprole);
Example
const embed = new Discord.MessageEmbed().setColor("BLURPLE").setDescription("Click to add role !")
const Setuprole = new disreact.RoleSetup()
.addRole({role: "833098076050030635", emoji: "👍", style: "green" })
.addRole({role: "833098076050030635", label: "member", style: "red" })
.addRole({role: "833098076050030635", label: "news", emoji: "📰" })
message.channel.createReactRoleMessage(embed, Setuprole)
// or
message.channel.createReactRoleMessage("Click to add role !", Setuprole)
- You can put max 25 roles.
- If you don't precise any style, it will be "grey".