class Worker::DiscordClient::AsyncVoiceClient
Overview
Discord voice client facade
Defined in:
worker/discord_client/async_voice_client.crConstant Summary
-
CONNECTION_CHECK_INTERVAL =
200.milliseconds
-
CONNECTION_TIMEOUT =
4.seconds
-
IDEAL_INTERVAL =
20.milliseconds
-
Log =
Worker::Log.for("discord_async_voice_client")
Constructors
Instance Method Summary
-
#current_frame : UInt64
Returns current frame (originally 'frame' is 20 ms of playback)
-
#on_close(&on_close : -> ) : Nil
Setup WS close event listener
-
#play(audio : AudioPlayer::Audio, skip_frames : UInt64 = 0_u64) : Nil
Play single track
-
#stop : Nil
Stop playback
-
#voice_server_update(endpoint : String, token : String, session_id : String) : Nil
VSU event handler
Instance methods inherited from class Worker::DiscordClient::VoiceClient
current_frame : UInt64
current_frame,
on_close(&) : Nil
on_close,
play(audio : AudioPlayer::Audio, skip_frames : UInt64 = 0_u64) : Nil
play,
stop : Nil
stop,
voice_server_update(endpoint : String, token : String, session_id : String) : Nil
voice_server_update
Constructor Detail
def self.new(server_id : UInt64, bot_id : UInt64, endpoint : String, token : String, session_id : String)
#
Instance Method Detail
def current_frame : UInt64
#
Description copied from class Worker::DiscordClient::VoiceClient
Returns current frame (originally 'frame' is 20 ms of playback)
def on_close(&on_close : -> ) : Nil
#
Description copied from class Worker::DiscordClient::VoiceClient
Setup WS close event listener
Description copied from class Worker::DiscordClient::VoiceClient
Play single track
def voice_server_update(endpoint : String, token : String, session_id : String) : Nil
#
Description copied from class Worker::DiscordClient::VoiceClient
VSU event handler