From a4d326bb2634d8567564081982bd807204de6fee Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Wed, 24 May 2023 11:20:09 +0800 Subject: [PATCH] chore: remove stale button handler --- src/index.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/index.ts b/src/index.ts index 274a0d3..2656746 100644 --- a/src/index.ts +++ b/src/index.ts @@ -98,22 +98,6 @@ client.once('ready', async () => { }); client.on('interactionCreate', async (interaction) => { - if (interaction.isButton() && interaction.customId === 'delete-message') { - const messageRef = interaction.message.reference?.messageId; - if (messageRef) { - const msg = await interaction.message.channel.messages.fetch(messageRef); - - if (interaction?.user === msg.author) { - await interaction.message.delete(); - } else { - await interaction.reply({ - content: 'You can only delete your own messages!', - ephemeral: true, - }); - } - } - } - if (interaction.isChatInputCommand()) { const { commandName } = interaction;