From d07384a01e1adcf2d6efcae1cdcbc732456ba60d Mon Sep 17 00:00:00 2001 From: Dragory Date: Thu, 20 Sep 2018 22:07:38 +0300 Subject: [PATCH] Add botMentionResponse option. Fixes #143 --- src/config.js | 1 + src/main.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index 7c2e0bb..89cc73d 100644 --- a/src/config.js +++ b/src/config.js @@ -55,6 +55,7 @@ const defaultConfig = { "newThreadCategoryId": null, "mentionRole": "here", "pingOnBotMention": true, + "botMentionResponse": null, "inboxServerPermission": null, "alwaysReply": false, diff --git a/src/main.js b/src/main.js index 94e4a12..be1344a 100644 --- a/src/main.js +++ b/src/main.js @@ -170,10 +170,15 @@ bot.on('messageCreate', async msg => { content = `${staffMention}Bot mentioned in ${msg.channel.mention} (${msg.channel.guild.name}) by **${msg.author.username}#${msg.author.discriminator}**: "${msg.cleanContent}"`; } - bot.createMessage(utils.getLogChannel(bot).id, { + bot.createMessage(utils.getLogChannel().id, { content, disableEveryone: false, }); + + // Send an auto-response to the mention, if enabled + if (config.botMentionResponse) { + bot.createMessage(msg.channel.id, config.botMentionResponse); + } }); module.exports = {