Fix addidental error when a thread was not returned but no errors were thrown

master
Miikka Virtanen 2017-09-20 23:06:19 +03:00
parent d8c29e6e0b
commit ccb6f7345b
2 changed files with 3 additions and 6 deletions

View File

@ -3,6 +3,7 @@
## Sep 20, 2017 ## Sep 20, 2017
* Fixed crash when the bot was unable to find or create a modmail thread * 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 * 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 ## Sep 19, 2017
* Added `logChannelId` option * Added `logChannelId` option

View File

@ -95,12 +95,8 @@ Here's what their message contained:
} }
if (! thread) { if (! thread) {
utils.postError(` // If there's no thread returned, this message was probably ignored (e.g. due to a common word)
Modmail thread for ${msg.author.username}#${msg.author.discriminator} (${msg.author.id}) was not found. // TODO: Move that logic here instead?
Here's what their message contained:
\`\`\`${msg.cleanContent}\`\`\`
`);
return; return;
} }