crux_structs v0.2.3 Crux.Structs.Attachment View Source

Represents a Discord Attachment Object

Height and width are only present for images.

Link to this section Summary

Functions

Creates a t:Crux.Structs.Attachment.t/0 struct from raw data.

Link to this section Types

Specs

t() :: %Crux.Structs.Attachment{
  filename: String.t(),
  height: integer() | nil,
  id: Crux.Structs.Snowflake.t(),
  proxy_url: String.t(),
  size: integer(),
  url: String.t(),
  width: integer() | nil
}

Link to this section Functions

Link to this function

create(data)

View Source (since 0.1.0)

Specs

create(data :: map()) :: t()

Creates a t:Crux.Structs.Attachment.t/0 struct from raw data.

Automatically invoked by Crux.Structs.create/2.