Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 2 KB

examples.md

File metadata and controls

40 lines (31 loc) · 2 KB

Pre-made Buttons and Examples

Examples

Normal Button

let button = new disbut.MessageButton()
  .setStyle('red')
  .setLabel('My First Button!') 
  .setID('click_to_function') 
  .setDisabled();

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

URL Buttons

let button = new disbut.MessageButton()
  .setStyle('url')
  .setURL('https://npmjs.com/discord-buttons') 
  .setLabel('My First URL Button!') 
  .setDisabled(); 

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

P.S: You need to Change your style to url, you don't have id for this kind of buttons too, and also make sure you have your URL in button with setURL and URL is valid.

Button Styles

Styles Preview
Red Red_Style
Green Green_Style
Blurple Blurple_Style
grey (or gray) Grey_Style
URL URL_Style