From b6d1ac9a60e8b8a967ef3e93b92b9748d1f637f9 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 8 Sep 2021 16:02:51 -0400 Subject: fix support threads, allow 0 for abreviated numbers, fix accent colors --- src/commands/leveling/setXp.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/commands/leveling/setXp.ts') diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index fdfd74f..8be3a10 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -62,6 +62,12 @@ export default class SetXpCommand extends BushCommand { return await message.util.reply(`${util.emojis.error} This command is Bestower proof.`); if (!user.id) throw new Error('user.id is null'); + if (isNaN(xp)) return await message.util.reply(`${util.emojis.error} Provide a valid number.`); + if (xp > 2147483647 || xp < 0) + return await message.util.reply( + `${util.emojis.error} Provide an positive integer under \`2147483647\` to set the user's xp to.` + ); + const [levelEntry] = await Level.findOrBuild({ where: { user: user.id, -- cgit