mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 00:10:58 -05:00
Prevent music player error on Spotify links.
This commit is contained in:
parent
5dec21ad85
commit
e455ddc11c
@ -31,6 +31,7 @@ export default {
|
|||||||
play: async()=>{
|
play: async()=>{
|
||||||
const url = interaction.options.getString('url');
|
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('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=<random string of letters>` from the URL or it will basically do nothing.')
|
||||||
player.play(interaction.member.voice.channel, url);
|
player.play(interaction.member.voice.channel, url);
|
||||||
await interaction.reply(`Added the ${url.includes('playlist/') ? 'playlist' : 'song'} to the queue.`);
|
await interaction.reply(`Added the ${url.includes('playlist/') ? 'playlist' : 'song'} to the queue.`);
|
||||||
},
|
},
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"registerCommands": true,
|
"registerCommands": true,
|
||||||
"commands": true,
|
"commands": true,
|
||||||
"logs": true,
|
"logs": true,
|
||||||
"music": false,
|
"music": true,
|
||||||
"buttonRoles": true,
|
"buttonRoles": true,
|
||||||
"automod": true,
|
"automod": true,
|
||||||
"mpstats": true,
|
"mpstats": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user