Don't alert for main server pings if the pinger is a bot

master
Dragory 2018-08-01 00:40:12 +03:00
parent fd0679d6b0
commit 6b8a409ff4
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,8 @@
# Changelog
## v2.14.1
* Don't alert for main server pings if the pinger is a bot
## v2.14.0
* Changed `requiredAccountAge` to be in hours instead of days

View File

@ -146,6 +146,7 @@ bot.on('messageDelete', async msg => {
bot.on('messageCreate', async msg => {
if (! utils.messageIsOnMainServer(msg)) return;
if (! msg.mentions.some(user => user.id === bot.user.id)) return;
if (msg.author.bot) return;
// If the person who mentioned the modmail bot is also on the modmail server, ignore them
if (utils.getInboxGuild().members.get(msg.author.id)) return;