diff options
Diffstat (limited to 'src/commands/leveling/setLevel.ts')
-rw-r--r-- | src/commands/leveling/setLevel.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index 69f562d..5118a8b 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -1,5 +1,4 @@ -import { AllowedMentions, BushCommand, Level, type BushMessage, type BushSlashMessage } from '#lib'; -import { type User } from 'discord.js'; +import { AllowedMentions, ArgType, BushCommand, Level, type BushMessage, type BushSlashMessage } from '#lib'; export default class SetLevelCommand extends BushCommand { public constructor() { @@ -34,7 +33,10 @@ export default class SetLevelCommand extends BushCommand { }); } - public override async exec(message: BushMessage | BushSlashMessage, { user, level }: { user: User; level: number }) { + public override async exec( + message: BushMessage | BushSlashMessage, + { user, level }: { user: ArgType<'user'>; level: ArgType<'integer'> } + ) { 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'); |