From 3a8de491ab4991f41a6ec14764f9fd087549dc39 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 3 Sep 2021 17:27:01 -0400 Subject: fix setxp --- src/commands/leveling/setXp.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/commands') diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index 4a07519..7aff8e7 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -17,15 +17,18 @@ export default class SetXpCommand extends BushCommand { type: 'user', prompt: { start: 'What user would you like to change the xp of?', - retry: '{error} Choose a valid user to change the xp of.' + retry: '{error} Choose a valid user to change the xp of.', + required: true } }, { id: 'xp', type: 'abbreviatedNumber', + match: 'restContent', prompt: { start: 'How much xp should the user have?', - retry: "{error} Choose a valid number to set the user's xp to." + retry: "{error} Choose a valid number to set the user's xp to.", + required: true } } ], @@ -67,7 +70,8 @@ export default class SetXpCommand extends BushCommand { guild: message.guild.id } }); - await levelEntry.update({ xp: xp }); + + await levelEntry.update({ xp: xp, user: user.id, guild: message.guild.id }); return await message.util.send({ content: `Successfully set <@${user.id}>'s xp to \`${levelEntry.xp.toLocaleString()}\` (level \`${Level.convertXpToLevel( levelEntry.xp -- cgit