Class: VoiceReceiver

VoiceReceiver

Receives audio packets from a voice connection.

Constructor

new VoiceReceiver()

Source:
Example
const receiver = connection.createReceiver();
// opusStream is a ReadableStream - that means you could play it back to a voice channel if you wanted to!
const opusStream = receiver.createStream(user);

Methods

createStream(user, options) → {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.
Source:
Returns:
Type
ReadableStream

Events

debug

Emitted whenever there is a warning
Parameters:
Name Type Description
error Error | string The error or message to debug
Source: