set to 0 instead of -1

merge-requests/4/head
Matthew 2020-05-03 19:00:18 -04:00
parent 1775afb2d3
commit caf27269a9
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ export default class Limits_SetRAMNotification extends Command {
if (Number(args[0]) >= tier.resourceLimits.ram) return message.channel.createMessage(`***${this.client.stores.emojis.error} You cannot set your notification limit to be set to or above your hard limit.***`); if (Number(args[0]) >= tier.resourceLimits.ram) return message.channel.createMessage(`***${this.client.stores.emojis.error} You cannot set your notification limit to be set to or above your hard limit.***`);
if (Number(args[0]) < 0) return message.channel.createMessage(`***${this.client.stores.emojis.error} You cannot set your notification limit to a negative number.***`); if (Number(args[0]) < 0) return message.channel.createMessage(`***${this.client.stores.emojis.error} You cannot set your notification limit to a negative number.***`);
if (Number(args[0]) === 0) { if (Number(args[0]) === 0) {
await account.updateOne({ $set: { ramLimitNotification: -1 } }); await account.updateOne({ $set: { ramLimitNotification: 0 } });
return message.channel.createMessage(`***${this.client.stores.emojis.success} You have disabled notifications.***`); return message.channel.createMessage(`***${this.client.stores.emojis.success} You have disabled notifications.***`);
} }
await account.updateOne({ $set: { ramLimitNotification: Number(args[0]) } }); await account.updateOne({ $set: { ramLimitNotification: Number(args[0]) } });