2019-01-19 19:11:27 +01:00
|
|
|
const { Inhibitor } = require('discord-akairo');
|
2021-03-13 18:21:18 +01:00
|
|
|
const Blacklists = require('../../models').Blacklists;
|
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;
|
2021-03-13 18:21:18 +01:00
|
|
|
|
|
|
|
const blacklist = await Blacklists.findOne({where: {type:'guild', uid:message.guild.id}});
|
2019-10-06 20:29:42 +02:00
|
|
|
|
|
|
|
if (blacklist) return true;
|
|
|
|
|
2019-01-19 19:11:27 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-25 13:41:20 +02:00
|
|
|
module.exports = serverblacklistInhibitor;
|