-
Notifications
You must be signed in to change notification settings - Fork 0
/
events_send.go
40 lines (34 loc) · 990 Bytes
/
events_send.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package godiscord
type Heartbeat struct {
OpCode int `json:"op"`
LastSequence *int `json:"d"`
}
const (
UserStatusOnline = "online"
UserStatusDND = "dnd"
UserStatusIdle = "idle"
UserStatusInvisible = "invisible"
UserStatusOffline = "offline"
)
type Identify struct {
OpCode int `json:"op"`
Payload IdentifyPayload `json:"d"`
}
type IdentifyPayload struct {
Token string `json:"token"`
Properties Properties `json:"properties"`
Compress bool `json:"compress,omitempty"`
LargeThreshold int `json:"large_threshold,omitempty"`
Shard []int `json:"shard,omitempty"`
Presence *Presence `json:"presence"`
Intents int `json:"intents"`
}
type Resume struct {
OpCode int `json:"op"`
Payload ResumePayload `json:"d"`
}
type ResumePayload struct {
Token string `json:"token"`
SessionID string `json:"session_id"`
LastSequence uint64 `json:"seq"`
}