class

Worker::DiscordClient::AsyncVoiceClient

Inherits Worker::DiscordClient::VoiceClient < Reference < Object

Discord voice client facade

Constants

CONNECTION_CHECK_INTERVAL = 200.milliseconds
CONNECTION_TIMEOUT = 4.seconds
IDEAL_INTERVAL = 20.milliseconds
Log = Worker::Log.for("discord_async_voice_client")

Constructors

new(server_id : UInt64, bot_id : UInt64, endpoint : String, token : String, session_id : String)
Source

Instance methods

current_frame

Returns current frame (originally 'frame' is 20 ms of playback)

Source
on_close

Setup WS close event listener

Source
play(audio : AudioPlayer::Audio, skip_frames : UInt64 = 0_u64) : Nil

Play single track

Source
stop

Stop playback

Source
voice_server_update(endpoint : String, token : String, session_id : String) : Nil

VSU event handler

Source

Nested types