From 6163d259ed52991e2f95632b5a0516607aa56a5f Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 12 Apr 2022 17:21:05 +0200 Subject: Handle gateway errors and reconnections --- pkg/discord/gateway/payloads.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkg/discord/gateway/payloads.go') diff --git a/pkg/discord/gateway/payloads.go b/pkg/discord/gateway/payloads.go index 8da894f..87c37d3 100644 --- a/pkg/discord/gateway/payloads.go +++ b/pkg/discord/gateway/payloads.go @@ -28,11 +28,17 @@ type Payload[D any] struct { } type IdentifyCmd struct { - Token string `json:"token"` - Intents uint64 `json:"intents"` + Token string `json:"token"` + Intents uint64 `json:"intents"` Properties IdentifyProperties `json:"properties"` } +type ResumeCmd struct { + Token string `json:"token"` + SessionID string `json:"session_id"` + Sequence uint64 `json:"seq"` +} + type HelloEvent struct { HeartbeatInterval uint64 `json:"heartbeat_interval"` } -- cgit 1.4.1