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', {
|
2020-05-25 13:41:20 +02:00
|
|
|
reason: 'serverblacklist',
|
2019-01-19 19:11:27 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async exec(message) {
|
2020-03-04 02:08:04 +01:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-25 13:41:20 +02:00
|
|
|
module.exports = serverblacklistInhibitor;
|