From 6d56d43b3eb3e02805842b7f0edaadd41b54bae7 Mon Sep 17 00:00:00 2001 From: Michael Cramer Date: Sun, 17 May 2026 09:40:35 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20react=20with=20=F0=9F=8E=81=20emoji=20w?= =?UTF-8?q?hen=20a=20code=20is=20detected=20in=20a=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Cramer --- src/bot/bot.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bot/bot.ts b/src/bot/bot.ts index 5ba1a6d..d86df10 100644 --- a/src/bot/bot.ts +++ b/src/bot/bot.ts @@ -194,6 +194,12 @@ client.on(Events.MessageCreate, async (message) => { if (foundCodes.length > 0) { logger.info(`Found ${foundCodes.length} codes in message from ${message.author.tag}`); + // React to the message to signal the bot detected a code (fire-and-forget + // so API latency / rate-limiting does not delay the redemption path). + message.react('🎁').catch((err) => { + logger.warn('Could not react to message (missing permissions?):', err); + }); + // Deduplicate in case the same code appears multiple times in one message. const uniqueCodes = [...new Set(foundCodes)];