From 20ec27eac550825a596e66220e887fa74a851f6a Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 9 Sep 2021 21:48:26 -0400 Subject: fix typo --- src/commands/leveling/leaderboard.ts | 13 ++++++++++++- src/commands/leveling/level.ts | 12 +++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'src/commands') diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts index 953a6c5..4fb1765 100644 --- a/src/commands/leveling/leaderboard.ts +++ b/src/commands/leveling/leaderboard.ts @@ -41,8 +41,19 @@ export default class LeaderboardCommand extends BushCommand { if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`); if (!(await message.guild.hasFeature('leveling'))) return await message.util.reply( - `${util.emojis.error} This command can only be run in commands with the leveling feature enabled.` + `${util.emojis.error} This command can only be run in servers with the leveling feature enabled.${ + message.member?.permissions.has('MANAGE_GUILD') + ? ` You can toggle features using the \`${ + message.util.isSlash + ? '/' + : client.config.isDevelopment + ? 'dev ' + : message.util.parsed?.prefix ?? client.config.prefix + }features\` command.` + : '' + }` ); + const ranks = (await Level.findAll({ where: { guild: message.guild.id } })).sort((a, b) => b.xp - a.xp); const mapedRanks = ranks.map( (val, index) => `\`${index + 1}\` <@${val.user}> - Level ${val.level} (${val.xp.toLocaleString()} xp)` diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index f14c005..33ad705 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -132,7 +132,17 @@ export default class LevelCommand extends BushCommand { if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`); if (!(await message.guild.hasFeature('leveling'))) return await message.util.reply( - `${util.emojis.error} This command can only be run in commands with the leveling feature enabled.` + `${util.emojis.error} This command can only be run in servers with the leveling feature enabled.${ + message.member?.permissions.has('MANAGE_GUILD') + ? ` You can toggle features using the \`${ + message.util.isSlash + ? '/' + : client.config.isDevelopment + ? 'dev ' + : message.util.parsed?.prefix ?? client.config.prefix + }features\` command.` + : '' + }` ); const user = args.user ?? message.author; try { -- cgit