Haha-Yes/event/inhibitors/serverblacklist.js

21 lines
485 B
JavaScript
Raw Normal View History

2019-01-19 19:11:27 +01:00
const { Inhibitor } = require('discord-akairo');
2019-10-06 20:29:42 +02:00
const guildBlacklist = require('../../models').guildBlacklist;
2019-01-19 19:11:27 +01:00
class serverblacklistInhibitor extends Inhibitor {
constructor() {
super('serverblacklist', {
reason: 'serverblacklist',
2019-01-19 19:11:27 +01:00
});
}
async exec(message) {
if (message.channel.type == 'dm') return;
2019-10-06 20:29:42 +02:00
const blacklist = await guildBlacklist.findOne({where: {guildID:message.guild.id}});
if (blacklist) return true;
2019-01-19 19:11:27 +01:00
}
}
module.exports = serverblacklistInhibitor;