Treat every message as a reply

master
ahalekelly 2017-05-01 07:56:49 +00:00
parent 0c26f94038
commit cca19ec38e
1 changed files with 10 additions and 0 deletions

View File

@ -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;