Update README.md

This commit is contained in:
Killer069 2021-08-31 09:36:11 +05:30 committed by GitHub
parent ee4558ae1b
commit 201865af09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ if(validate(url)) // Will return true if url is a YouTube url
### stream(url : `string`) ### stream(url : `string`)
*This is basic to create a youtube stream from a url.* *This is basic to create a youtube stream from a url.*
```js ```js
let source = await stream(<url>) // This will create a stream Class which contains type and stream to be played. let source = await stream("url") // This will create a stream Class which contains type and stream to be played.
let resource = createAudioResource(source.stream, { let resource = createAudioResource(source.stream, {
inputType : source.type inputType : source.type
}) // This creates resource for playing }) // This creates resource for playing
@ -53,7 +53,7 @@ if(validate(url)) // Will return true if url is a YouTube url
### stream_from_info(info : `infoData`) ### stream_from_info(info : `infoData`)
*This is basic to create a youtube stream from a info [ from video_info function ].* *This is basic to create a youtube stream from a info [ from video_info function ].*
```js ```js
let info = await video_info(<url>) let info = await video_info("url")
let source = await stream_from_info(info) // This will create a stream Class which contains type and stream to be played. let source = await stream_from_info(info) // This will create a stream Class which contains type and stream to be played.
let resource = createAudioResource(source.stream, { let resource = createAudioResource(source.stream, {
inputType : source.type inputType : source.type