diff --git a/src/index.js b/src/index.js index 9714df3..c1d6694 100644 --- a/src/index.js +++ b/src/index.js @@ -46,7 +46,7 @@ function formatAttachment(attachment) { }); } -// "Forward all messages not starting in prefix" +// If the alwaysReply option is set to true, send all messages in modmail threads as replies, unless they start with the prefix if (config.alwaysReply) { bot.on('messageCreate', msg => { if (! msg.channel.guild) return; diff --git a/src/threads.js b/src/threads.js index 4894d8d..d8c4a29 100644 --- a/src/threads.js +++ b/src/threads.js @@ -3,6 +3,9 @@ const utils = require('./utils'); const jsonDb = require('./jsonDb'); const config = require('../config'); +// If the following messages would be used to start a thread, ignore it instead +// This is to prevent accidental threads from e.g. irrelevant replies after the thread was already closed +// or replies to the greeting message const accidentalThreadMessages = [ 'ok', 'okay',