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
embedMessageEmbed✅noneThe embed of your message that is sent with the necessary buttons
contentstring❌noneThe 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 ID✅noneThe role to be given when a button is clicked
labelstring❌{Role name}The label of the button you're trying to create
emojistring❌noneThe emoji of the button you're trying to create
styleMessageButtonStyle❌PRIMARYThe style of the button that is getting created.
urlstring❌noneThe URL that needs to be redirected when clicked (Only when the style is LINK)