From 7e577fca46cf7d1e0c3b72fcfcd4d26b32e2b966 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Tue, 21 Jul 2020 09:24:07 -0500 Subject: [PATCH] Add ENOMEM error message --- events/messageCreate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/events/messageCreate.js b/events/messageCreate.js index 0a1ce8fa..cfc43606 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -69,6 +69,8 @@ module.exports = async (message) => { await client.createMessage(message.channel.id, `${message.author.mention}, the resulting file was too large to upload. Try again with a smaller image if possible.`); } else if (error.toString().includes("Timed out")) { await client.createMessage(message.channel.id, `${message.author.mention}, the request timed out before I could download that image. Try uploading your image somewhere else.`); + } else if (error.toString().includes("ENOMEM")) { + await client.createMessage(message.channel.id, `${message.author.mention}, looks like I'm out of available resources to run this command at the moment. Try again in a bit; a more permanent fix is in the works.`); } else { logger.error(error.toString()); await client.createMessage(message.channel.id, "Uh oh! I ran into an error while running this command. Please report the content of the attached file here or on the esmBot Support server: ", [{ -- 2.51.2