kitazith/webhook/execute

Types

pub type ExecutePayload {
  ExecutePayload(
    content: option.Option(String),
    username: option.Option(String),
    avatar_url: option.Option(String),
    tts: option.Option(Bool),
    embeds: option.Option(List(embed.Embed)),
    allowed_mentions: option.Option(
      allowed_mentions.AllowedMentions,
    ),
    components: option.Option(List(component.Component)),
    attachments: option.Option(List(attachment.Attachment)),
    flags: option.Option(List(ExecutePayloadFlag)),
    thread_name: option.Option(String),
    applied_tags: option.Option(List(snowflake.Snowflake)),
    poll: option.Option(poll.Poll),
  )
}

Constructors

Learn more:

pub type ExecutePayloadFlag {
  SuppressEmbeds
  SuppressNotifications
  IsComponentsV2
}

Constructors

  • SuppressEmbeds

    Include no embeds

  • SuppressNotifications

    Do not trigger a notification

  • IsComponentsV2

Values

pub fn new() -> ExecutePayload
pub fn to_json(payload: ExecutePayload) -> json.Json
pub fn to_string(payload: ExecutePayload) -> String
pub fn to_string_tree(
  payload: ExecutePayload,
) -> string_tree.StringTree
pub fn validate(
  payload: ExecutePayload,
) -> Result(ExecutePayload, List(validation.ValidationError))
pub fn with_applied_tags(
  payload: ExecutePayload,
  applied_tags: List(snowflake.Snowflake),
) -> ExecutePayload
pub fn with_attachments(
  payload: ExecutePayload,
  attachments: List(attachment.Attachment),
) -> ExecutePayload
pub fn with_avatar_url(
  payload: ExecutePayload,
  avatar_url: String,
) -> ExecutePayload
pub fn with_components(
  payload: ExecutePayload,
  components: List(component.Component),
) -> ExecutePayload
pub fn with_content(
  payload: ExecutePayload,
  content: String,
) -> ExecutePayload
pub fn with_embeds(
  payload: ExecutePayload,
  embeds: List(embed.Embed),
) -> ExecutePayload
pub fn with_flags(
  payload: ExecutePayload,
  flags: List(ExecutePayloadFlag),
) -> ExecutePayload
pub fn with_poll(
  payload: ExecutePayload,
  poll: poll.Poll,
) -> ExecutePayload
pub fn with_thread_name(
  payload: ExecutePayload,
  thread_name: String,
) -> ExecutePayload
pub fn with_tts(
  payload: ExecutePayload,
  tts: Bool,
) -> ExecutePayload
pub fn with_username(
  payload: ExecutePayload,
  username: String,
) -> ExecutePayload
Search Document