From 16842d71275d0dd66eaf49333f58c234a14ba199 Mon Sep 17 00:00:00 2001 From: Supositware Date: Wed, 6 Sep 2023 12:28:17 +0200 Subject: [PATCH] Don't accept playlist (They didn't work already before) --- commands/utility/addytp.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/utility/addytp.js b/commands/utility/addytp.js index 5123483..74b78e0 100644 --- a/commands/utility/addytp.js +++ b/commands/utility/addytp.js @@ -18,6 +18,11 @@ export default { cooldown: 86400, async execute(interaction, args) { const url = args.url; + // This is rather rudementary, a proper way would be using yt-dlp to know if it is a playlist + if (url.includes('list=')) { + return interaction.reply({ content: '❌ Playlists are not allowed!', ephemeral: true }); + } + if (!await utils.stringIsAValidurl(url)) { console.error(`Not a url!!! ${url}`); return interaction.reply({ content: '❌ This does not look like a valid url!', ephemeral: true });