Merge branch 'master' of github.com:Dragory/modmailbot

master
Dragory 2020-01-19 21:32:42 +02:00
commit d5f8839446
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
3 changed files with 7 additions and 3 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
!/config.example.ini
/welcome.png
/update.sh
/tags.*

View File

@ -50,6 +50,7 @@ module.exports = {
'okey thx',
'okey no problem',
'okey np',
'cheers'
'cheers',
'!close'
],
};

View File

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