Lingo.Api.Voice (Lingo v0.4.2)

Copy Markdown View Source

Voice regions and voice states. To join voice channels, see Lingo.Voice.

Every function returns {:ok, result}, :ok when Discord sends no body, or {:error, %Lingo.Error{}}. Calls go to the current bot (see Lingo.with_bot/2).

Summary

Functions

Fetches the bot's voice state in a guild.

Fetches a user's voice state in a guild.

Lists Discord's voice regions.

Edits the bot's voice state, e.g. to request to speak on a stage.

Edits a user's voice state on a stage.

Functions

get_current_state(guild_id)

@spec get_current_state(Lingo.Api.id()) :: Lingo.Api.result(Lingo.Type.VoiceState.t())

Fetches the bot's voice state in a guild.

get_state(guild_id, user_id)

Fetches a user's voice state in a guild.

list_regions()

@spec list_regions() :: Lingo.Api.result([Lingo.Type.VoiceRegion.t()])

Lists Discord's voice regions.

update_current_state(guild_id, params)

@spec update_current_state(Lingo.Api.id(), Lingo.Api.params()) :: Lingo.Api.result()

Edits the bot's voice state, e.g. to request to speak on a stage.

update_state(guild_id, user_id, params)

@spec update_state(Lingo.Api.id(), Lingo.Api.id(), Lingo.Api.params()) ::
  Lingo.Api.result()

Edits a user's voice state on a stage.