aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config/blacklist.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-17 20:03:05 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-17 20:03:05 -0400
commite1c613829950a534d9f45c00a033b83575be3b3c (patch)
tree2de1e5231217211ae4087c46cc74dc46c584507a /src/commands/config/blacklist.ts
parent0e87bbd3940d89defcb04926587b35c8f4d1947f (diff)
downloadtanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.gz
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.bz2
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.zip
remove global client variable
Diffstat (limited to 'src/commands/config/blacklist.ts')
-rw-r--r--src/commands/config/blacklist.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts
index 80acd0b..6768a1c 100644
--- a/src/commands/config/blacklist.ts
+++ b/src/commands/config/blacklist.ts
@@ -6,8 +6,6 @@ import {
clientSendAndPermCheck,
emojis,
format,
- getGlobal,
- setGlobal,
type ArgType,
type CommandMessage,
type SlashMessage
@@ -83,10 +81,10 @@ export default class BlacklistCommand extends BushCommand {
if (!global) assert(message.inGuild());
const blacklistedUsers = global
- ? getGlobal('blacklistedUsers')
+ ? this.client.utils.getGlobal('blacklistedUsers')
: (await message.guild!.getSetting('blacklistedChannels')) ?? [];
const blacklistedChannels = global
- ? getGlobal('blacklistedChannels')
+ ? this.client.utils.getGlobal('blacklistedChannels')
: (await message.guild!.getSetting('blacklistedUsers')) ?? [];
if (action === 'toggle') {
action = blacklistedUsers.includes(targetID) || blacklistedChannels.includes(targetID) ? 'unblacklist' : 'blacklist';
@@ -100,7 +98,7 @@ export default class BlacklistCommand extends BushCommand {
const key = target instanceof User ? 'blacklistedUsers' : 'blacklistedChannels';
const success = await (global
- ? setGlobal(key, newValue)
+ ? this.client.utils.setGlobal(key, newValue)
: message.guild!.setSetting(key, newValue, message.member as GuildMember)
).catch(() => false);