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: String,
    intents: intents.Intents,
    cache: Cache,
    subject: process.Subject(BotMessage),
  )
}

Constructors

Used to send user messages to the websocket process

pub type BotMessage {
  SendPacket(packet: String)
}

Constructors

  • SendPacket(packet: String)

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

pub type Cache {
  Cache(
    messages: booklet.Booklet(
      dict.Dict(String, message.MessagePacketData),
    ),
  )
}

Constructors

Search Document