blob: 67721887178e561b843b212e301e6ea24e72d1aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { BushInhibitor } from '../../lib/extensions/discord-akairo/BushInhibitor';
import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage';
import { BushMessage } from '../../lib/extensions/discord.js/BushMessage';
export default class UserBlacklistInhibitor extends BushInhibitor {
constructor() {
super('userBlacklist', {
reason: 'userBlacklist',
category: 'blacklist',
type: 'all'
});
}
public exec(message: BushMessage | BushSlashMessage): boolean {
if (!message.author) return false;
if (this.client.isOwner(message.author) || this.client.isSuperUser(message.author)) return false;
return this.client.cache.global.blacklistedUsers.includes(message.author.id);
}
}
|