Haha-Yes/event/inhibitors/serverblacklist.js
loicbersier 18c0b62b48 Change inhibitor type to all
Signed-off-by: loicbersier <loic.bersier1@gmail.com>
2020-05-25 13:41:20 +02:00

21 lines
500 B
JavaScript

const { Inhibitor } = require('discord-akairo');
const guildBlacklist = require('../../models').guildBlacklist;
class serverblacklistInhibitor extends Inhibitor {
constructor() {
super('serverblacklist', {
reason: 'serverblacklist',
type: 'all'
});
}
async exec(message) {
if (message.channel.type == 'dm') return;
const blacklist = await guildBlacklist.findOne({where: {guildID:message.guild.id}});
if (blacklist) return true;
}
}
module.exports = serverblacklistInhibitor;