void HandleInvalidSessionPayload(DiscordApiData payload, DiscordApiData data) { bool isResumable = data.ToBoolean().Value; if (isResumable) { // Resume log.LogInfo("[InvalidSession] Resuming..."); OnReconnectionRequired?.Invoke(this, new ReconnectionEventArgs(false, 5000)); } else { // Start new session log.LogInfo("[InvalidSession] Starting new session..."); OnReconnectionRequired?.Invoke(this, new ReconnectionEventArgs(true, rnd.Next(1000, 5001))); } }