From 7ecbe09573c8d75dd68ab81b9d525fd01a39f2fb Mon Sep 17 00:00:00 2001 From: supositware Date: Thu, 30 Jun 2022 20:08:57 +0200 Subject: [PATCH] Fix error when there is no quality option for the video --- commands/utility/download.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/utility/download.js b/commands/utility/download.js index 3a3845b..6e4194b 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -62,6 +62,11 @@ export default { options.reverse(); } + if (options.length < 2) { + await interaction.deleteReply(); + return interaction.followUp({ content: '❌ There is no other quality option for this video!', ephemeral: true }); + } + const row = new MessageActionRow() .addComponents( new MessageSelectMenu()