Skip to content
SinisterRectus edited this page Dec 11, 2016 · 13 revisions

Represents a connection to a Discord voice server.

Class Properties

Name Type Mutable Description
channel GuildVoiceChannel The channel for which the connection exists.

Class Methods

Prototype Description
getBitrate() Returns the current bitrate for the connection in bits per second.
pauseStream() Pauses the current audio stream, if one exists and is playing.
playBytes(string[, duration]) Interprets a Lua string as a byte array and streams it.
playFile(filename[, duration]) Streams an audio file via FFmpeg.
playPCM(table[, duration]) Interprets a Lua table as a PCM array and streams it.
playWaveform(generator[, duration]) Streams PCM data returned from a generator function.
resumeStream() Resumes the current audio stream, if one exists and is paused.
setBitrate() Sets the current bitrate for the connection (8000 to 128000 bps range).
stopStream() Stops the current audio stream, if one exists.
Clone this wiki locally