createButton()
A simple function that facilitates the creation of buttons.
// To create a button using discord.js
import { ButtonBuilder, ButtonStyle } from 'discord.js' // Module ESM
const { ButtonBuilder, ButtonStyle } = require('discord.js') // Module CommonJS
new ButtonBuilder({
label: 'Lunaris', customId: 'Package',
style: ButtonStyle.Primary
});
// To create a button using lunaris
import { createButton } from 'lunaris' // Module ESM
const { createButton } = require('lunaris') // Module CommonJS
createButton({
label: 'Lunaris', buttonId: 'Package',
style: 'Primary'
});
Button Parameters
Parameters
Types
Required
label
string
true
buttonId
string
true
string
true
emoji
string
false
disabled
boolean
false
Last updated