discord_gleam/discord/snowflake
Snowflakes is discord’s type for unique identifiers.
They are 64-bit unsigned integers, represented as strings.
See https://discord.com/developers/docs/reference#snowflakes
Types
pub type Application
pub type Attachment
pub type Interaction
We are representing Discord’s snowflake as a string
pub opaque type Snowflake(kind)
Values
pub fn compare(
a: Snowflake(kind),
b: Snowflake(kind),
) -> order.Order
pub fn decoder() -> decode.Decoder(Snowflake(kind))
API should not give a int, but incase it does we will convert to string.
pub fn from_string(value: String) -> Snowflake(kind)