VoiceReceiver
classe · Source
Receives audio packets from a voice connection.
Constructor
new VoiceReceiver()
Methods
createStream
createStream(user: UserResolvable, options: ReceiveStreamOptions): ReadableStream
Creates a new audio receiving stream. If a stream already exists for a user, then that stream will be returned rather than generating a new one. Parameters
| Name | Type | Description |
|---|---|---|
user | UserResolvable | The user to start listening to. |
options | ReceiveStreamOptions | Options. |
Returns: ReadableStreamSource
createVideoStream
createVideoStream(user: UserResolvable, output: WritableStream | string): Recorder
Creates a new video receiving stream. If a stream already exists for a user, then that stream will be returned rather than generating a new one. Proof of concept - Requires a very good internet connection Parameters
| Name | Type | Description |
|---|---|---|
user | UserResolvable | The user to start listening to. |
output | WritableStream | string | Output stream or file path to write the video stream to. |
Returns: Recorder — The video stream for the specified user. Source
Events
debug
debug: unknown
Emitted whenever there is a warning Parameters
| Name | Type | Description |
|---|---|---|
error | Error | string | The error or message to debug |
| Source |