From 51fb5dc25e2c96f8f8a96f2baa07687d17b31239 Mon Sep 17 00:00:00 2001 From: Lea Date: Sat, 6 May 2023 20:48:00 +0200 Subject: [PATCH] workaround for mongodb being wack --- bot/src/bot/modules/antispam.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot/src/bot/modules/antispam.ts b/bot/src/bot/modules/antispam.ts index e859b76..c1e7822 100644 --- a/bot/src/bot/modules/antispam.ts +++ b/bot/src/bot/modules/antispam.ts @@ -267,6 +267,11 @@ const notifyPublicServers = async () => { try { logger.info(`Sending notification to owner of server ${serverConfig.id}`); + if (serverConfig.discoverAutospamNotify) { + logger.warn('This server already received the message'); + continue; + } + await dbs.SERVERS.update( { id: serverConfig.id }, { $set: { discoverAutospamNotify: true, antispamEnabled: true, allowBlacklistedUsers: false } },