Open giorgionegro opened 2 years ago
i think it would be more handy if play and playlist command would be one, i have made a dirty workaround adding a check in play
const query = handler.commandInteraction.options.getString('query'); const youtubeInterface = YouTubeInterface.fromGuild(handler.guild); //if query is a youtube playlist url reinterpret it as a playlist if(query!=null&&query.startsWith('https://www.youtube.com/playlist?list=')){ const playlistUrl = query; const youtubePlaylist = YouTubePlaylist.fromUrl(playlistUrl); /// playlist ... /// } else if (query) { const [video] = await YouTubeVideo.search(query, 1); /// normal audio ..... ////
Interesting suggestion, I think I will have a look into this with more detail at some point and see if it's something I would add to the project 🤔
Thanks!
Jack
i think it would be more handy if play and playlist command would be one, i have made a dirty workaround adding a check in play