Haha-Yes/event/inhibitors/blacklist.js

19 lines
415 B
JavaScript
Raw Permalink Normal View History

2018-12-30 01:20:24 +01:00
const { Inhibitor } = require('discord-akairo');
2021-03-13 18:21:18 +01:00
const Blacklists = require('../../models').Blacklists;
2018-12-30 01:20:24 +01:00
class BlacklistInhibitor extends Inhibitor {
2019-01-02 08:09:45 +01:00
constructor() {
super('blacklist', {
reason: 'blacklist'
});
}
2018-12-30 01:20:24 +01:00
2019-01-19 19:01:41 +01:00
async exec(message) {
2021-03-13 18:21:18 +01:00
const blacklist = await Blacklists.findOne({where: {type:'global', uid:message.author.id}});
2019-10-06 20:29:42 +02:00
if (blacklist) return true;
2019-01-02 08:09:45 +01:00
}
2018-12-30 01:20:24 +01:00
}
module.exports = BlacklistInhibitor;