Fix error when there is no quality option for the video

This commit is contained in:
supositware 2022-06-30 20:08:57 +02:00
parent d8877229f2
commit 7ecbe09573

View file

@ -62,6 +62,11 @@ export default {
options.reverse(); 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() const row = new MessageActionRow()
.addComponents( .addComponents(
new MessageSelectMenu() new MessageSelectMenu()