From e455ddc11cf948c4f3f9f7e096c0a7f89912b193 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Thu, 13 Jul 2023 21:40:05 +1000 Subject: [PATCH] Prevent music player error on Spotify links. --- src/commands/music.ts | 1 + src/config.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/music.ts b/src/commands/music.ts index f12c88d..5af8f9e 100644 --- a/src/commands/music.ts +++ b/src/commands/music.ts @@ -31,6 +31,7 @@ export default { play: async()=>{ const url = interaction.options.getString('url'); if (!url.includes('https://open.spotify.com/')) return interaction.reply('Sorry, I can\'t play that. I can only accept Spotify links that contains `https://open.spotify.com/`'); + if (!url.includes('?si=')) return interaction.reply('To be able to play this song/playlist, you need to remove the `?si=` from the URL or it will basically do nothing.') player.play(interaction.member.voice.channel, url); await interaction.reply(`Added the ${url.includes('playlist/') ? 'playlist' : 'song'} to the queue.`); }, diff --git a/src/config.json b/src/config.json index 0aa1401..e669cc6 100644 --- a/src/config.json +++ b/src/config.json @@ -19,7 +19,7 @@ "registerCommands": true, "commands": true, "logs": true, - "music": false, + "music": true, "buttonRoles": true, "automod": true, "mpstats": true,