allow to set 0

This commit is contained in:
JonnyBro 2021-12-29 02:27:48 +05:00
parent 0ac2ec26c2
commit e8f58c4452

View file

@ -25,7 +25,7 @@ class Set extends Command {
if (member.user.bot) return message.error("administration/set:BOT_USER"); if (member.user.bot) return message.error("administration/set:BOT_USER");
const number = args[2]; const number = args[2];
if (!number || isNaN(number) || parseInt(number, 10) <= 0) return message.error("administration/set:INVALID_AMOUNT"); if (!number || isNaN(number) || parseInt(number, 10) < 0) return message.error("administration/set:INVALID_AMOUNT");
const amount = Math.ceil(parseInt(number, 10)); const amount = Math.ceil(parseInt(number, 10));
const memberData = await this.client.findOrCreateMember({ const memberData = await this.client.findOrCreateMember({