Discord Elixir v1.1.4 DiscordEx.Voice.Controller

Voice control to make voice interaction a lot easier.

Summary

Functions

Play some audio to a channel

Stop audio from playing in channel and clear buffer

Functions

listen_socket(voice_client)
play(voice_client, path, opts \\ %{})

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})
start(voice_client)
stop(voice_client)

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)