forked from Supositware/Haha-Yes
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
501 B
JavaScript
19 lines
501 B
JavaScript
5 years ago
|
const { Inhibitor } = require('discord-akairo');
|
||
|
const commandblock = require('../../models').commandBlock;
|
||
|
|
||
|
class commandblockInhibitor extends Inhibitor {
|
||
|
constructor() {
|
||
|
super('commandblock', {
|
||
|
reason: 'commandblock'
|
||
|
});
|
||
|
}
|
||
|
|
||
|
async exec(message, command) {
|
||
|
if (message.channel.type == 'dm') return false;
|
||
|
const blacklist = await commandblock.findOne({where: {serverID:message.guild.id, command: command.id}});
|
||
|
|
||
|
if (blacklist) return true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = commandblockInhibitor;
|