Skip to content

devil54a/ServersBlacklist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Servers Blacklist Code (Discord.js)

Usage

Add Server To Blacklist

!blacklist add serverID

Remove Server From Blacklist

!blacklist remove serverID

Check Examples

Normal Event

client.on('messageCreate', async (message) => {
  if (message.content !== (prefix+"ping")) return;
  const isAllowed = await client.isGuildAllowed(message);
  if (!isAllowed) return;
  message.reply('pong 🏓')
})

Handler

module.exports = {
 name: 'messageCreate', // interactionCreate ✅
 async execute(message) { // execute(interaction) ✅
   ///.......
   ///.......if (!command) return;
   const isAllowed = await client.isGuildAllowed(message); // client.isGuildAllowed(interaction) ✅
  if (!isAllowed) return;
  //........
  //........ command.execute
 }
}

Required Packages

pro.db

discord.js >= v13

Our Server

DEVELOPER-TOOLS

About

Add A Server To The Blacklist (Discord.js)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors