updated YouTube cookies example

This commit is contained in:
Killer069 2021-09-07 13:04:47 +05:30 committed by GitHub
parent 8d30d5dc80
commit 1efd6eacf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,17 +17,13 @@ client.on('messageCreate', async message => {
}) })
let args = message.content.split('play ')[1].split(' ')[0] let args = message.content.split('play ')[1].split(' ')[0]
let stream = await play.stream(args, { let stream = await play.stream(args, COOKIE)
cookie : COOKIE
})
/* /*
OR if you want to get info about youtube link and then stream it OR if you want to get info about youtube link and then stream it
let yt_info = await play.video_info(args, { let yt_info = await play.video_info(args, COOKIE)
cookie : COOKIE
})
console.log(yt_info.video_details.title) console.log(yt_info.video_details.title)
let stream = await play.stream_from_info(yt_info) let stream = await play.stream_from_info(yt_info, COOKIE)
*/ */
let resource = createAudioResource(stream.stream, { let resource = createAudioResource(stream.stream, {