From 3ad42c670ad2056f6494697fc3070ea3cd8df455 Mon Sep 17 00:00:00 2001 From: Armano den Boef Date: Mon, 14 Feb 2022 16:46:24 +0100 Subject: [PATCH] Init --- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index b0215d9ef..dd415517b 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -152,7 +152,8 @@ namespace Discord.WebSocket LogGatewayIntentWarnings = config.LogGatewayIntentWarnings; HandlerTimeout = config.HandlerTimeout; State = new ClientState(0, 0); - Rest = new DiscordSocketRestClient(config, ApiClient); + if (shardedClient == null || (shardedClient.Shards?.Count > 1 && shardedClient.Shards.First()?.ShardId == ShardId)) + Rest = new DiscordSocketRestClient(config, ApiClient); _heartbeatTimes = new ConcurrentQueue(); _gatewayIntents = config.GatewayIntents; _defaultStickers = ImmutableArray.Create>();