discord_gleam/types/bot

Types

The Bot type holds bot data used by a lot of high-level functions

pub type Bot {
  Bot(
    token: String,
    client_id: Snowflake,
    intents: intents.Intents,
    cache: Cache,
  )
}

Constructors

  • Bot(
      token: String,
      client_id: Snowflake,
      intents: intents.Intents,
      cache: Cache,
    )

The cache currently only stores messages, which can be used to for example get deleted messages

pub type Cache {
  Cache(
    messages: option.Option(
      uset.USet(#(Snowflake, MessagePacketData)),
    ),
  )
}

Constructors

  • Cache(
      messages: option.Option(
        uset.USet(#(Snowflake, MessagePacketData)),
      ),
    )
Search Document