EDA.Event.VoiceChannelEffectSend (EDA v0.5.0-beta.2)

Copy Markdown View Source

Dispatched when someone sends an effect — an emoji reaction or a soundboard sound — in a voice channel the bot is connected to. Needs the :guild_voice_states intent.

For a soundboard sound, sound_id and sound_volume are set; for an emoji reaction they are nil. animation_type is :premium for the animation a Nitro subscriber sends and :basic for the standard one.

Summary

Functions

Converts a raw Discord payload into this event struct.

Whether this effect is a soundboard sound rather than an emoji reaction.

Types

t()

@type t() :: %EDA.Event.VoiceChannelEffectSend{
  animation_id: integer() | nil,
  animation_type: :premium | :basic | integer() | nil,
  channel_id: String.t() | nil,
  emoji: EDA.Emoji.t() | nil,
  guild_id: String.t() | nil,
  sound_id: String.t() | nil,
  sound_volume: float() | nil,
  user_id: String.t() | nil
}

Functions

from_raw(raw)

@spec from_raw(map()) :: t()

Converts a raw Discord payload into this event struct.

soundboard?(voice_channel_effect_send)

@spec soundboard?(t()) :: boolean()

Whether this effect is a soundboard sound rather than an emoji reaction.