crux_structs v0.2.3 Crux.Structs.Reaction View Source
Represents a Discord Reaction Object.
Link to this section Summary
Functions
Creates a t:Crux.Structs.Presence.t/0
struct from raw data.
Resolves the id of a t:Crux.Structs.Reaction.t/0
.
Link to this section Types
Specs
id_resolvable() :: Crux.Structs.Reaction.t() | Crux.Structs.Emoji.t() | Crux.Structs.Snowflake.t() | String.t()
All available types that can be resolved into a reaction / emoji id.
Specs
t() :: %Crux.Structs.Reaction{ count: integer(), emoji: Crux.Structs.Emoji.t(), me: boolean() }
Link to this section Functions
Specs
Creates a t:Crux.Structs.Presence.t/0
struct from raw data.
Automatically invoked by
Crux.Structs.create/2
.
Specs
resolve_id(id_resolvable()) :: Crux.Structs.Snowflake.t() | nil
Resolves the id of a t:Crux.Structs.Reaction.t/0
.
Automatically invoked by
Crux.Structs.resolve_id/2
.
iex> %Crux.Structs.Reaction{emoji: %Crux.Structs.Emoji{id: 618731477143912448}}
...> |> Crux.Structs.Reaction.resolve_id()
618731477143912448
iex> %Crux.Structs.Emoji{id: 618731477143912448}
...> |> Crux.Structs.Reaction.resolve_id()
618731477143912448
iex> 618731477143912448
...> |> Crux.Structs.Reaction.resolve_id()
618731477143912448
iex> "618731477143912448"
...> |> Crux.Structs.Reaction.resolve_id()
618731477143912448