discord_gleam/types/role

Types

See https://discord.com/developers/docs/topics/permissions#role-object
This is a simplified version of the channel object.

pub type Role {
  Role(
    id: snowflake.Snowflake(snowflake.Role),
    name: String,
    color: option.Option(Int),
    hoist: Bool,
    icon: option.Option(String),
    unicode_emoji: option.Option(String),
    position: Int,
    permissions: String,
    managed: Bool,
    mentionable: Bool,
    flags: Int,
  )
}

Constructors

Values

pub fn from_json_string(
  encoded: String,
) -> Result(Role, @internal DiscordError)

Convert a JSON string to a role object

pub fn json_decoder() -> decode.Decoder(Role)
Search Document