From ccb6f7345bf53ad3dd4a405a59c93e33da93a176 Mon Sep 17 00:00:00 2001 From: Miikka Virtanen Date: Wed, 20 Sep 2017 23:06:19 +0300 Subject: [PATCH] Fix addidental error when a thread was not returned but no errors were thrown --- CHANGELOG.md | 1 + src/index.js | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24ec5a3..e66e6b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Sep 20, 2017 * Fixed crash when the bot was unable to find or create a modmail thread * Reduced error log spam in case of network errors from Eris +* Fix unintended error when a message was ignored due to an "accidental thread" word ## Sep 19, 2017 * Added `logChannelId` option diff --git a/src/index.js b/src/index.js index 20aa678..e6358ac 100644 --- a/src/index.js +++ b/src/index.js @@ -95,12 +95,8 @@ Here's what their message contained: } if (! thread) { - utils.postError(` -Modmail thread for ${msg.author.username}#${msg.author.discriminator} (${msg.author.id}) was not found. - -Here's what their message contained: -\`\`\`${msg.cleanContent}\`\`\` -`); + // If there's no thread returned, this message was probably ignored (e.g. due to a common word) + // TODO: Move that logic here instead? return; }