From 702a933099d4edb4ed4c36309f32e73bae9b989c Mon Sep 17 00:00:00 2001 From: Armano den Boef Date: Mon, 14 Feb 2022 17:09:19 +0100 Subject: [PATCH] Final; Check if parentclient was passed --- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index e5fe3346b..ecd53cf65 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -152,7 +152,7 @@ namespace Discord.WebSocket LogGatewayIntentWarnings = config.LogGatewayIntentWarnings; HandlerTimeout = config.HandlerTimeout; State = new ClientState(0, 0); - if (shardedClient == null || !shardedClient.Shards.Any()) + if (shardedClient is null || parentClient is null) Rest = new DiscordSocketRestClient(config, ApiClient); _heartbeatTimes = new ConcurrentQueue(); _gatewayIntents = config.GatewayIntents;