From cca19ec38e6ded5e7edafcc7f98b5c066b56aac5 Mon Sep 17 00:00:00 2001 From: ahalekelly Date: Mon, 1 May 2017 07:56:49 +0000 Subject: [PATCH] Treat every message as a reply --- src/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/index.js b/src/index.js index 7c31882..2966bf9 100644 --- a/src/index.js +++ b/src/index.js @@ -57,6 +57,16 @@ function formatUserDM(msg) { }); } +bot.on('messageCreate', msg => { + if (! msg.channel.guild) return; + if (msg.channel.guild.id !== utils.getModmailGuild(bot).id) return; + if (! msg.member.permission.has('manageRoles')) return; + if (msg.author.bot) return; + if (msg.content[0] == bot.commandOptions.prefix) return; + + reply(msg, msg.content.trim(), false); +}); + // "Bot was mentioned in #general-discussion" bot.on('messageCreate', msg => { if (msg.author.id === bot.user.id) return;