diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-08 12:25:35 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-08 12:25:35 -0500 |
commit | 0e160ae77477f0986a02746e84158329299f438f (patch) | |
tree | 55a70950bae700bbd77ff693aecd1b2cbf0777cf /src/commands/dev | |
parent | 42eab3390f7e2fcdc020eb1e3d602a46c9f34273 (diff) | |
download | tanzanite-0e160ae77477f0986a02746e84158329299f438f.tar.gz tanzanite-0e160ae77477f0986a02746e84158329299f438f.tar.bz2 tanzanite-0e160ae77477f0986a02746e84158329299f438f.zip |
add shared db
Diffstat (limited to 'src/commands/dev')
-rw-r--r-- | src/commands/dev/superUser.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index 3a6406d..f937ad4 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -1,4 +1,4 @@ -import { BushCommand, Global, type ArgType, type BushMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; export default class SuperUserCommand extends BushCommand { @@ -57,12 +57,12 @@ export default class SuperUserCommand extends BushCommand { if (!message.author.isOwner()) return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`); - const superUsers: string[] = (await Global.findByPk(client.config.environment))?.superUsers ?? []; + const superUsers: string[] = util.getShared('superUsers'); if (action === 'add' ? superUsers.includes(user.id) : !superUsers.includes(user.id)) return message.util.reply(`${util.emojis.warn} \`${user.tag}\` is ${action === 'add' ? 'already' : 'not'} a superuser.`); - const success = await util.insertOrRemoveFromGlobal(action, 'superUsers', user.id).catch(() => false); + const success = await util.insertOrRemoveFromShared(action, 'superUsers', user.id).catch(() => false); if (success) { return await message.util.reply( |