Skip to content

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

NameTypeDescription
userUserResolvableThe user to start listening to.
optionsReceiveStreamOptionsOptions.

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

NameTypeDescription
userUserResolvableThe user to start listening to.
outputWritableStream | stringOutput 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

NameTypeDescription
errorError | stringThe error or message to debug
Source

Unofficial software. Not affiliated with or supported by Discord.