Add direct link to message onBotMention (#319)
parent
425c0bb210
commit
7bec58cd1c
|
@ -5,3 +5,4 @@
|
|||
!/config.example.ini
|
||||
/welcome.png
|
||||
/update.sh
|
||||
/tags.*
|
||||
|
|
|
@ -50,6 +50,7 @@ module.exports = {
|
|||
'okey thx',
|
||||
'okey no problem',
|
||||
'okey np',
|
||||
'cheers'
|
||||
'cheers',
|
||||
'!close'
|
||||
],
|
||||
};
|
||||
|
|
|
@ -124,6 +124,7 @@ function initBaseMessageHandlers() {
|
|||
messageQueue.add(async () => {
|
||||
let thread = await threads.findOpenThreadByUserId(msg.author.id);
|
||||
|
||||
|
||||
// New thread
|
||||
if (! thread) {
|
||||
// Ignore messages that shouldn't usually open new threads, such as "ok", "thanks", etc.
|
||||
|
@ -211,11 +212,12 @@ function initBaseMessageHandlers() {
|
|||
const staffMention = (config.pingOnBotMention ? utils.getInboxMention() : '');
|
||||
|
||||
if (mainGuilds.length === 1) {
|
||||
content = `${staffMention}Bot mentioned in ${msg.channel.mention} by **${msg.author.username}#${msg.author.discriminator}**: "${msg.cleanContent}"`;
|
||||
content = `${staffMention}Bot mentioned in ${msg.channel.mention} by **${msg.author.username}#${msg.author.discriminator}(${msg.author.id})**: "${msg.cleanContent}"\n\n<https:\/\/discordapp.com\/channels\/${msg.channel.guild.id}\/${msg.channel.id}\/${msg.id}>`;
|
||||
} else {
|
||||
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.author.id})**: "${msg.cleanContent}"\n\n<https:\/\/discordapp.com\/channels\/${msg.channel.guild.id}\/${msg.channel.id}\/${msg.id}>`;
|
||||
}
|
||||
|
||||
|
||||
bot.createMessage(utils.getLogChannel().id, {
|
||||
content,
|
||||
disableEveryone: false,
|
||||
|
|
Loading…
Reference in New Issue