diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-16 14:32:18 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-16 14:32:18 -0400 |
commit | 0e87bbd3940d89defcb04926587b35c8f4d1947f (patch) | |
tree | e50860d4dc25a11d4c3977b583284c4bcad1b077 /src/commands/leveling/level.ts | |
parent | 661e4c9935aeb8760dafc7ced4bbec6cc356a033 (diff) | |
download | tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.gz tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.bz2 tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.zip |
remove util classes, move config out of src
Diffstat (limited to 'src/commands/leveling/level.ts')
-rw-r--r-- | src/commands/leveling/level.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index 34a839a..df3e5b2 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -2,7 +2,10 @@ import { AllowedMentions, BushCommand, CanvasProgressBar, + clientSendAndPermCheck, + emojis, Level, + prefix, type CommandMessage, type OptArgType, type SlashMessage @@ -39,7 +42,7 @@ export default class LevelCommand extends BushCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => util.clientSendAndPermCheck(m), + clientPermissions: (m) => clientSendAndPermCheck(m), userPermissions: [] }); } @@ -49,9 +52,9 @@ export default class LevelCommand extends BushCommand { if (!(await message.guild.hasFeature('leveling'))) return await message.util.reply( - `${util.emojis.error} This command can only be run in servers with the leveling feature enabled.${ + `${emojis.error} This command can only be run in servers with the leveling feature enabled.${ message.member?.permissions.has(PermissionFlagsBits.ManageGuild) - ? ` You can toggle features using the \`${util.prefix(message)}features\` command.` + ? ` You can toggle features using the \`${prefix(message)}features\` command.` : '' }` ); @@ -63,7 +66,7 @@ export default class LevelCommand extends BushCommand { } catch (e) { if (e instanceof Error && e.message === 'User does not have a level') { return await message.util.reply({ - content: `${util.emojis.error} ${user} does not have a level.`, + content: `${emojis.error} ${user} does not have a level.`, allowedMentions: AllowedMentions.none() }); } else throw e; |