aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config/disable.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/disable.ts
parent0e87bbd3940d89defcb04926587b35c8f4d1947f (diff)
downloadtanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.gz
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.bz2
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.zip
remove global client variable
Diffstat (limited to 'src/commands/config/disable.ts')
-rw-r--r--src/commands/config/disable.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts
index 4f52b7c..e9866d5 100644
--- a/src/commands/config/disable.ts
+++ b/src/commands/config/disable.ts
@@ -5,8 +5,6 @@ import {
BushCommand,
clientSendAndPermCheck,
emojis,
- getGlobal,
- setGlobal,
type ArgType,
type CommandMessage,
type SlashMessage
@@ -81,12 +79,14 @@ export default class DisableCommand extends BushCommand {
if (DisableCommand.blacklistedCommands.includes(commandID))
return message.util.send(`${emojis.error} the ${commandID} command cannot be disabled.`);
- const disabledCommands = global ? getGlobal('disabledCommands') : await message.guild.getSetting('disabledCommands');
+ const disabledCommands = global
+ ? this.client.utils.getGlobal('disabledCommands')
+ : await message.guild.getSetting('disabledCommands');
if (action === 'toggle') action = disabledCommands.includes(commandID) ? 'disable' : 'enable';
const newValue = addOrRemoveFromArray(action === 'disable' ? 'add' : 'remove', disabledCommands, commandID);
const success = global
- ? await setGlobal('disabledCommands', newValue).catch(() => false)
+ ? await this.client.utils.setGlobal('disabledCommands', newValue).catch(() => false)
: await message.guild.setSetting('disabledCommands', newValue, message.member!).catch(() => false);
if (!success)
return await message.util.reply({