Discord Elixir v1.1.18 DiscordEx.Voice.Client View Source

This client is for specifically working with voice. You can pass this process to your regular client if you wish to use it with your bot.

Examples

token = "<your-token>"
DiscordEx.Voice.Client.connect(base_client, %{guild_id: 392090239, channel_id: 23208203092390)
#=> {:ok, #PID<0.180.0>}

Link to this section Summary

Functions

Initialize a voice connection

Kill a voice connection

Callback implementation for c::websocket_client.init/1

Callback implementation for c::websocket_client.onconnect/2

Callback implementation for c::websocket_client.ondisconnect/2

Reconnect or initiate voice connection

Callback implementation for c::websocket_client.websocket_handle/3

Ability to update speaking state

Callback implementation for c::websocket_client.websocket_terminate/3

Link to this section Functions

Link to this function connect(base_client, options \\ %{}) View Source
connect(pid(), map()) :: {:ok, pid()}

Initialize a voice connection

Link to this function disconnect(voice_client) View Source
disconnect(pid()) :: atom()

Kill a voice connection

Link to this function handle_event(arg, state) View Source

Callback implementation for c::websocket_client.init/1.

Callback implementation for c::websocket_client.onconnect/2.

Link to this function ondisconnect(arg, state) View Source

Callback implementation for c::websocket_client.ondisconnect/2.

Link to this function reconnect(client_pid, options) View Source
reconnect(pid(), map()) :: {:ok, pid()}

Reconnect or initiate voice connection

Link to this function socket_url(url) View Source
socket_url(map()) :: String.t()
Link to this function websocket_handle(arg, socket, state) View Source

Callback implementation for c::websocket_client.websocket_handle/3.

Link to this function websocket_info(arg1, arg2, state) View Source

Ability to update speaking state

Link to this function websocket_terminate(reason, conn_state, state) View Source

Callback implementation for c::websocket_client.websocket_terminate/3.