From be90532eda64ed6d4394f40e3c8a0bc8879e00f3 Mon Sep 17 00:00:00 2001 From: vertex-admin <63997517+vertex-admin@users.noreply.github.com> Date: Fri, 20 Aug 2021 15:46:59 -0700 Subject: [PATCH] Add SessionStartLimit to GatewayBotResponse struct (#949) Current GatewayBotResponse struct is missing the information required for max concurrency sharding. --- structs.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/structs.go b/structs.go index de6eb0c..62cc45c 100644 --- a/structs.go +++ b/structs.go @@ -1107,8 +1107,17 @@ type MessageReaction struct { // GatewayBotResponse stores the data for the gateway/bot response type GatewayBotResponse struct { - URL string `json:"url"` - Shards int `json:"shards"` + URL string `json:"url"` + Shards int `json:"shards"` + SessionStartLimit SessionInformation `json:"session_start_limit"` +} + +// SessionInformation provides the information for max concurrency sharding +type SessionInformation struct { + Total int `json:"total,omitempty"` + Remaining int `json:"remaining,omitempty"` + ResetAfter int `json:"reset_after,omitempty"` + MaxConcurrency int `json:"max_concurrency,omitempty"` } // GatewayStatusUpdate is sent by the client to indicate a presence or status update