discord_gleam/ws/packets/hello
Types
Packet returned by discord upon connecting to the gateway
pub type HelloPacket {
HelloPacket(op: Int, d: HelloPacketData)
}
Constructors
-
HelloPacket(op: Int, d: HelloPacketData)
pub type HelloPacketData {
HelloPacketData(heartbeat_interval: Int)
}
Constructors
-
HelloPacketData(heartbeat_interval: Int)
Values
pub fn string_to_data(
encoded: String,
) -> Result(HelloPacket, DecodeError)