From eb1cce3d70eb186186c8e2dd60cdc6e118699aee Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 3 May 2020 18:49:03 -0400 Subject: [PATCH] fixes --- src/intervals/memory.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/intervals/memory.ts b/src/intervals/memory.ts index c3390c9..998ed29 100644 --- a/src/intervals/memory.ts +++ b/src/intervals/memory.ts @@ -76,8 +76,7 @@ export default function memory(client: Client) { embed.setFooter(client.user.username, client.user.avatarURL); embed.setTimestamp(); await client.createMessage(channelID, { embed }); - if (memoryConversion >= acc.ramLimitNotification) { - if (acc.ramLimitNotification === -1) return; + if ((memoryConversion >= acc.ramLimitNotification) && (acc.ramLimitNotification !== -1)) { const notifyEmbed = new RichEmbed() .setTitle('Cloud Account | Notification') .setDescription(`You are about to reach your RAM resource limits, you are currently using '${String(memoryConversion)} MB' and your limit is '${String(userLimits.hard - 10)} MB'. Please correct your usage to avoid further action.\nYou can set your notification preferences by running \`=limits set-ram-notification \`, you can disable these notifications by running \`=limits set-ram-notification -1\`.`)