From a0d569a1247993e3c429aa2cb3c7da02a47b1319 Mon Sep 17 00:00:00 2001 From: encode42 Date: Sun, 5 May 2024 13:10:48 -0400 Subject: [PATCH] Delete duplicate join messages --- src/discord/events/fixWelcomes.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/discord/events/fixWelcomes.ts b/src/discord/events/fixWelcomes.ts index c6eaf2a..bc472f2 100644 --- a/src/discord/events/fixWelcomes.ts +++ b/src/discord/events/fixWelcomes.ts @@ -47,7 +47,8 @@ client.on(Events.MessageCreate, (message) => { log.debug(`Join message for member ${message.author.displayName} detected.`); if (isDuplicate(message.author.username)) { - log.debug("Is a duplicate!"); + log.debug("..which is a duplicate!"); + message.delete(); } updateLast(message.author.username);