Add botMentionResponse option. Fixes #143

master
Dragory 2018-09-20 22:07:38 +03:00
parent 68af488663
commit d07384a01e
2 changed files with 7 additions and 1 deletions

View File

@ -55,6 +55,7 @@ const defaultConfig = {
"newThreadCategoryId": null, "newThreadCategoryId": null,
"mentionRole": "here", "mentionRole": "here",
"pingOnBotMention": true, "pingOnBotMention": true,
"botMentionResponse": null,
"inboxServerPermission": null, "inboxServerPermission": null,
"alwaysReply": false, "alwaysReply": false,

View File

@ -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}"`; 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, content,
disableEveryone: false, disableEveryone: false,
}); });
// Send an auto-response to the mention, if enabled
if (config.botMentionResponse) {
bot.createMessage(msg.channel.id, config.botMentionResponse);
}
}); });
module.exports = { module.exports = {