Lingo.Type.Onboarding (Lingo v0.4.2)

Copy Markdown View Source

A guild's onboarding: the questions (prompts) new members answer and the channels they get by default.

mode is :default (only default channels count towards the constraints Discord enforces) or :advanced (questions count too). Prompts and their options are maps with atom keys; a prompt's type is :multiple_choice or :dropdown.

Summary

Types

option()

@type option() :: %{
  id: String.t(),
  channel_ids: [String.t()],
  role_ids: [String.t()],
  emoji: Lingo.Type.Emoji.t() | nil,
  emoji_id: String.t() | nil,
  emoji_name: String.t() | nil,
  emoji_animated: boolean() | nil,
  title: String.t(),
  description: String.t() | nil
}

prompt()

@type prompt() :: %{
  id: String.t(),
  type: :multiple_choice | :dropdown | integer(),
  options: [option()],
  title: String.t(),
  single_select: boolean(),
  required: boolean(),
  in_onboarding: boolean()
}

t()

@type t() :: %Lingo.Type.Onboarding{
  default_channel_ids: [String.t()],
  enabled: boolean(),
  guild_id: String.t(),
  mode: :default | :advanced | integer(),
  prompts: [prompt()]
}