diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-26 20:07:19 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-26 20:07:19 -0400 |
commit | ed59b7f1827ab93573b079144c3eeaa01ce40492 (patch) | |
tree | 7ceac6d61a8a25586ab9bbaf7acfbade91c97132 /src/commands/leveling | |
parent | c0a81b014a56e4d44c826f78391a930361aab122 (diff) | |
download | tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.gz tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.bz2 tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.zip |
clean up, bug fixes
Diffstat (limited to 'src/commands/leveling')
-rw-r--r-- | src/commands/leveling/leaderboard.ts | 4 | ||||
-rw-r--r-- | src/commands/leveling/level.ts | 4 | ||||
-rw-r--r-- | src/commands/leveling/setLevel.ts | 7 | ||||
-rw-r--r-- | src/commands/leveling/setXp.ts | 7 |
4 files changed, 8 insertions, 14 deletions
diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts index 3f7fac8..61d3769 100644 --- a/src/commands/leveling/leaderboard.ts +++ b/src/commands/leveling/leaderboard.ts @@ -8,7 +8,7 @@ export default class LeaderboardCommand extends BushCommand { category: 'leveling', description: { content: 'Allows you to see the users with the highest levels in the server.', - usage: 'leaderboard [page]', + usage: ['leaderboard [page]'], examples: ['leaderboard 5'] }, args: [ @@ -37,7 +37,7 @@ export default class LeaderboardCommand extends BushCommand { }); } - public override async exec(message: BushMessage | BushSlashMessage, args: { page: number }): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage, args: { page: number }) { 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( diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index 219aab1..faaf201 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -21,7 +21,7 @@ export default class LevelCommand extends BushCommand { category: 'leveling', description: { content: 'Shows the level of a user', - usage: 'level [user]', + usage: ['level [user]'], examples: ['level', 'level @Tyman'] }, args: [ @@ -50,7 +50,7 @@ export default class LevelCommand extends BushCommand { }); } - public override async exec(message: BushMessage | BushSlashMessage, args: { user?: BushUser }): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage, args: { user?: BushUser }) { 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( diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index d3ee162..e085a8e 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -8,7 +8,7 @@ export default class SetLevelCommand extends BushCommand { category: 'leveling', description: { content: 'Sets the level of a user', - usage: 'set-level <user> <level>', + usage: ['set-level <user> <level>'], examples: ['set-level @Moulberry 69'] //nice }, args: [ @@ -50,10 +50,7 @@ export default class SetLevelCommand extends BushCommand { }); } - public override async exec( - message: BushMessage | BushSlashMessage, - { user, level }: { user: User; level: number } - ): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage, { user, level }: { user: User; level: number }) { if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a guild.`); if (!user.id) throw new Error('user.id is null'); diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index a140bfc..4bcaff6 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -8,7 +8,7 @@ export default class SetXpCommand extends BushCommand { category: 'leveling', description: { content: 'Sets the xp of a user', - usage: 'set-xp <user> <xp>', + usage: ['set-xp <user> <xp>'], examples: ['set-xp @Moulberry 69k'] //nice }, args: [ @@ -53,10 +53,7 @@ export default class SetXpCommand extends BushCommand { }); } - public override async exec( - message: BushMessage | BushSlashMessage, - { user, xp }: { user: User; xp: number } - ): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage, { user, xp }: { user: User; xp: number }) { if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a guild.`); if (!user.id) throw new Error('user.id is null'); |