diff --git a/event/inhibitors/serverblacklist.js b/event/inhibitors/serverblacklist.js new file mode 100644 index 0000000..6a7851f --- /dev/null +++ b/event/inhibitors/serverblacklist.js @@ -0,0 +1,16 @@ +const { Inhibitor } = require('discord-akairo'); + +class serverblacklistInhibitor extends Inhibitor { + constructor() { + super('serverblacklist', { + reason: 'serverblacklist' + }); + } + + async exec(message) { + const blacklist = []; + return blacklist.includes(message.guild.id); + } +} + +module.exports = serverblacklistInhibitor; \ No newline at end of file diff --git a/event/listeners/commandblocked.js b/event/listeners/commandblocked.js index f3ecd68..8c594a7 100644 --- a/event/listeners/commandblocked.js +++ b/event/listeners/commandblocked.js @@ -26,6 +26,9 @@ class CommandBlockedListener extends Listener { case 'blacklist': message.reply('You can\'t use this command because you have been blacklisted!'); break; + case 'serverblacklist': + message.reply('You can\'t use this command because the server have been blacklisted!'); + break; } } }