Haha-Yes/event/inhibitors/serverblacklist.js

22 lines
484 B
JavaScript
Raw Normal View History

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', {
reason: 'serverblacklist',
2019-01-19 19:11:27 +01:00
});
}
async exec(message) {
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
}
}
module.exports = serverblacklistInhibitor;