Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord-role-react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-role-react

Create beautiful role selection message !

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

discord-role-react


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".

Contact

Discord

Keywords

FAQs

Package last updated on 04 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc