diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-03 17:27:01 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-03 17:27:01 -0400 |
commit | 3a8de491ab4991f41a6ec14764f9fd087549dc39 (patch) | |
tree | b3f8c7f23078f5ec4bff3f2771e8d5630189df63 /src/commands/leveling | |
parent | d425de53cf712a72f339bf71a12c63770c0c8712 (diff) | |
download | tanzanite-3a8de491ab4991f41a6ec14764f9fd087549dc39.tar.gz tanzanite-3a8de491ab4991f41a6ec14764f9fd087549dc39.tar.bz2 tanzanite-3a8de491ab4991f41a6ec14764f9fd087549dc39.zip |
fix setxp
Diffstat (limited to 'src/commands/leveling')
-rw-r--r-- | src/commands/leveling/setXp.ts | 10 |
1 files changed, 7 insertions, 3 deletions
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 |