Add stop functionality, fix duration

This commit is contained in:
Azaaxin
2023-06-25 11:08:14 +02:00
committed by Myx
parent dddbe81fab
commit c802be1a61
17 changed files with 304 additions and 226 deletions

View File

@@ -1,14 +1,13 @@
const playdl = require('play-dl');
//TODO ADD SPOTIFY SUPPORT
async function getStream(query) {
const trackInfo = await playdl.spotify(query);
let searched = await play.search(`${trackInfo.name}`, {
limit: 1
}) // This will search the found track on youtube.
let stream = await play.stream(searched[0].url) // This will create stream from the above search
})
let stream = await play.stream(searched[0].url)
return stream;
}