From 4ae559097c1c2915af64a65d8b9bcbee7d1ef514 Mon Sep 17 00:00:00 2001 From: Supositware Date: Thu, 16 Jun 2022 10:25:45 +0200 Subject: [PATCH] Don't crash when using advanced a second time --- commands/download.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/download.js b/commands/download.js index bdcd625f..83247815 100644 --- a/commands/download.js +++ b/commands/download.js @@ -67,7 +67,7 @@ module.exports = { await interaction.deleteReply(); await interaction.followUp({ content: 'Which quality do you want?', ephemeral: true, components: [row] }); - interaction.client.on('interactionCreate', async (interactionMenu) => { + interaction.client.once('interactionCreate', async (interactionMenu) => { if (!interactionMenu.isSelectMenu()) return; if (interactionMenu.customId === 'downloadQuality') { await interactionMenu.deferReply({ ephemeral: false }); @@ -120,6 +120,7 @@ async function download(url, interaction) { await interaction.deleteReply(); await interaction.followUp({ content: 'Uh oh! An error has occured!', ephemeral: true }); }); + return; } async function downloadVideo(url, output, format) {