From 6b8a409ff4fefb38a4556d0e94e86eacb7a85018 Mon Sep 17 00:00:00 2001 From: Dragory Date: Wed, 1 Aug 2018 00:40:12 +0300 Subject: [PATCH] Don't alert for main server pings if the pinger is a bot --- CHANGELOG.md | 3 +++ src/main.js | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d3bf63..c5e7c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/main.js b/src/main.js index 8b58881..01c4517 100644 --- a/src/main.js +++ b/src/main.js @@ -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;