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,
websocket_name: option.Option(process.Name(UserMessage)),
)
}
Constructors
-
Bot( token: String, client_id: String, intents: intents.Intents, cache: Cache, websocket_name: option.Option(process.Name(UserMessage)), )
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
-
Cache( messages: booklet.Booklet( dict.Dict(String, message.MessagePacketData), ), )
Used to send user messages to the websocket process
pub type UserMessage {
SendPacket(packet: String)
}
Constructors
-
SendPacket(packet: String)