Skip to main content

btnRole

A Button Role System that lets you create button roles with your own message. | Requires: manageBtn()

Program

const simplydjs = require("simply-djs");
simplydjs.btnRole(interaction, {
data: {...}, // data object (required)
// options (optional)
})
NOTE

This is totally different from betterBtnRole !

betterBtnRole is an system which is an button role builder. where, btnRole is a function that sends your message (with embeds) with the buttons necessary for the button role.

Output

image

Arguments:

simplydjs.btnRole(
interaction: Discord.Message | Discord.CommandInteraction,
options: btnOptions
)

Options btnOptions

ParameterTypeRequiredDefaultDescription
embedMessageEmbednoneThe embed of your message that is sent with the necessary buttons
contentstringnoneThe content of your message that is sent with the necessary buttons
datadataObj[]noneThe data necessary to create the buttons. (Array of dataObj)
dataObj option

dataObj

ParameterTypeRequiredDefaultDescription
roleRole IDnoneThe role to be given when a button is clicked
labelstring{Role name}The label of the button you're trying to create
emojistringnoneThe emoji of the button you're trying to create
styleMessageButtonStylePRIMARYThe style of the button that is getting created.
urlstringnoneThe URL that needs to be redirected when clicked (Only when the style is LINK)