EDA.Onboarding.Option (EDA v0.5.0-beta.2)

Copy Markdown View Source

An answer to an onboarding prompt. Build one with EDA.Onboarding.option/2.

Summary

Functions

Converts a raw option into this struct. Discord sends the emoji as an object; an empty one (no id, no name) is read as no emoji.

Types

t()

@type t() :: %EDA.Onboarding.Option{
  channel_ids: [String.t()],
  description: String.t() | nil,
  emoji: EDA.Emoji.t() | nil,
  id: String.t() | nil,
  role_ids: [String.t()],
  title: String.t() | nil
}

Functions

from_raw(raw)

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

Converts a raw option into this struct. Discord sends the emoji as an object; an empty one (no id, no name) is read as no emoji.