aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config/blacklist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/config/blacklist.ts')
-rw-r--r--src/commands/config/blacklist.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts
index 33bff35..8093d83 100644
--- a/src/commands/config/blacklist.ts
+++ b/src/commands/config/blacklist.ts
@@ -69,16 +69,16 @@ export default class BlacklistCommand extends BushCommand {
const global = args.global && message.author.isOwner();
const target =
typeof args.target === 'string'
- ? (await Argument.cast('channel', this.client.commandHandler.resolver, message as BushMessage, args.target)) ??
- (await Argument.cast('user', this.client.commandHandler.resolver, message as BushMessage, args.target))
+ ? (await Argument.cast('channel', client.commandHandler.resolver, message as BushMessage, args.target)) ??
+ (await Argument.cast('user', client.commandHandler.resolver, message as BushMessage, args.target))
: args.target;
if (!target) return await message.util.reply(`${util.emojis.error} Choose a valid channel or user.`);
const targetID = target.id;
if (global) {
if (action === 'toggle') {
- const blacklistedUsers = (await Global.findByPk(this.client.config.environment)).blacklistedUsers;
- const blacklistedChannels = (await Global.findByPk(this.client.config.environment)).blacklistedChannels;
+ const blacklistedUsers = (await Global.findByPk(client.config.environment)).blacklistedUsers;
+ const blacklistedChannels = (await Global.findByPk(client.config.environment)).blacklistedChannels;
action = blacklistedUsers.includes(targetID) || blacklistedChannels.includes(targetID) ? 'unblacklist' : 'blacklist';
}
const success = await util