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

Voice control to make voice interaction a lot easier.

Link to this section Summary

Functions

Play some audio to a channel

Stop audio from playing in channel and clear buffer

Link to this section Functions

Link to this function listen_socket(voice_client) View Source
Link to this function play(voice_client, path, opts \\ %{}) View Source

Play some audio to a channel

Parameters

  • voice_client: The voice client so the library knows how to play it and where to
  • path: The path where your audio file lives
  • opts: Options like volume

Examples

DiscordEx.Controller.play(voice_client, "/my/awesome/audio.wav", %{volume: 128})

Stop audio from playing in channel and clear buffer

Parameters

  • voice_client: The voice client so the library knows how to play it and where to

Examples

DiscordEx.Controller.stop(voice_client)