Socket
Book a DemoInstallSign in
Socket

discord-buttons-plugins

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-buttons-plugins

easiest medium to use buttons with any discord API wrapper

latest
npmnpm
Version
3.3.5
Version published
Maintainers
1
Created
Source

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

  • 💬 Discord: Discord4Bots / MinCoder
  • ⚙️ Developer: CTK WARRIOR#7923
  • 🔧 Admin: @么Sintya#0001

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

discord-buttons-plugin

FAQs

Package last updated on 07 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts