Add botMentionResponse option. Fixes #143
parent
68af488663
commit
d07384a01e
|
@ -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,
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
Loading…
Reference in New Issue