From 0e52c1c6921346781e96264584262c7ab1efbedc Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Sun, 2 Nov 2025 09:18:47 -0800 Subject: [PATCH] fix: fixed the changes requested by naomi --- src/index.ts | 2 -- src/modules/checkAltText.ts | 1 - src/modules/handleAckButton.ts | 9 --------- 3 files changed, 12 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2e64b6e..cede599 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,8 +47,6 @@ client.on(Events.InteractionCreate, (interaction) => { }); return; } - - // Handle button clicks if (interaction.isButton()) { void handleAckButton(interaction); } diff --git a/src/modules/checkAltText.ts b/src/modules/checkAltText.ts index d58fdfc..df34948 100644 --- a/src/modules/checkAltText.ts +++ b/src/modules/checkAltText.ts @@ -33,7 +33,6 @@ export const checkAltText = async(message: Message): Promise => { if (noDescription.size > 0) { const reminder = getRandomValue(reminders); - // Button for acknowledgment await message.reply({ components: createAckButton(message.author.id), content: `${reminder}\n-# If you do not know how to do this, check [Discord's help article]()!\n-# Need help writing descriptive text? Our bot [Cordelia]() can do it for you!`, diff --git a/src/modules/handleAckButton.ts b/src/modules/handleAckButton.ts index b497f0e..bc89084 100644 --- a/src/modules/handleAckButton.ts +++ b/src/modules/handleAckButton.ts @@ -15,25 +15,16 @@ const handleAckButton = async( interaction: ButtonInteraction, ): Promise => { if (!interaction.customId.startsWith("ack-")) { - // Not our button return false; } - const [ , authorizedUserId ] = interaction.customId.split("-"); if (interaction.user.id !== authorizedUserId) { - // Show error that auto-deletes after 2 seconds await interaction.reply({ content: "❌ This button is only for the recipient.", flags: MessageFlags.Ephemeral, }); - setTimeout(() => { - void interaction.deleteReply().catch(() => { - // Intentionally empty - ignore deletion errors - }); - }, 2000); return true; } - await interaction.message.delete(); return true; };