npm.io
3.3.5 • Published 5 years ago

discord-buttons-plugins

Licence
ISC
Version
3.3.5
Deps
2
Size
11 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Discord Buttons Plugins

Easiest medium to use buttons with any discord API wrapper

   // SETUP
   const buttonClient = require('discord-buttons-plugins');
   const Discord = require("discord.js");
   const client = Discord.Client();
   buttonClient(client);
   
   // SETUP MESSAGE BUTTON
   const button = new buttonClient.MessageButton()
	 .setLabel("Click me")
	 .setStyle("green")
	 .setID("click");
	 
	
   // SEND MESSAGE WITH BUTTON
   
   buttonClient.send("There will be a button below this message",{
   channel: "CHANNEL ID",
   buttons: [ [button] ]
   })

List interaction

// listen to interaction 
buttonClient.on("click", (inta) =>{
inta.reply("Thanks for clicking me :3")
});

buttonClient.on("click", (inta) =>{
inta.channel.delete()
});

buttonClient.on("click", (inta) =>{
inta.guild.channels.create("Channel Testing :D")
});

buttonClient.on("click", (inta) =>{
let user = inta.clicker.user.username;
console.log(user);

let user_id = inta.clicker.id;
console.log(user_id);

let member = inta.clicker.member;
console.log(member);

let fetch = inta.clicker.fetch;
console.log(fetch);
});
L I N K S
F E A T U R E S
  • Easy to handle and use
  • Made with simplicity
  • Less complexity
C O N T A C T

Keywords