discord_gleam/event_handler
Types
pub type EventHandler =
fn(bot.Bot, Packet) -> Nil
pub type Packet {
MessagePacket(message.MessagePacket)
ReadyPacket(ready.ReadyPacket)
UnknownPacket(generic.GenericPacket)
MessageDeletePacket(message_delete.MessageDeletePacket)
}
Constructors
-
MessagePacket(message.MessagePacket)
-
ReadyPacket(ready.ReadyPacket)
-
UnknownPacket(generic.GenericPacket)
-
MessageDeletePacket(message_delete.MessageDeletePacket)
Functions
pub fn handle_event(
bot: Bot,
msg: String,
handlers: List(fn(Bot, Packet) -> Nil),
) -> Nil