“Botões Discord JS” Respostas de código

Botão Discord.js

//Note that you need the Node module installed!
let button = new disbut.MessageButton()
  .setStyle('red') //default: blurple
  .setLabel('My First Button!') //default: NO_LABEL_PROVIDED
  .setID('click_to_function') //note: if you use the style "url" you must provide url using .setURL('https://example.com')
  .setDisabled(); //disables the button | default: false

message.channel.send('Hey, i am powered by https://npmjs.com/discord-buttons', button);
Arjinoodles

Botões Discord JS

const disbut = require('discord-buttons')(client); // you'll need this module along side discord.js
let YESbutton = new disbut.MessageButton() // button yes
.setStyle('green') // green color
// if .setStyle('url'), then .setURL('https://discord-buttons.js.org/')
.setLabel('yea') // yea text
.setID('yes') // button id. if style is url, ignore this, url buttons dont have id's
let nobutton = new disbut.MessageButton() // button no
.setStyle('red') // red color, there also exists blurple and gray
.setLabel('nah') // nah text
.setID('no') // button id
.setDisabled() // OPTIONAL

message.channel.send('did you guys subscribe to technoblade?', {
	buttons: [YESbutton, nobutton]
})

client.on('clickButton', async (button) => {
	// code here
	// more examples at https://discord-buttons.js.org/
})
Wild Weevil

Botões de discórdia discord.js

npm i discord-buttons
Mysterious Mosquito

Respostas semelhantes a “Botões Discord JS”

Perguntas semelhantes a “Botões Discord JS”

Mais respostas relacionadas para “Botões Discord JS” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código