Fixes unused creation of REST clients for DiscordShardedClient shards. (#2109)
* Init * Remove unnecessary length check * Swap out for any check * Final; Check if parentclient was passed
This commit is contained in:
@@ -152,7 +152,8 @@ namespace Discord.WebSocket
|
|||||||
LogGatewayIntentWarnings = config.LogGatewayIntentWarnings;
|
LogGatewayIntentWarnings = config.LogGatewayIntentWarnings;
|
||||||
HandlerTimeout = config.HandlerTimeout;
|
HandlerTimeout = config.HandlerTimeout;
|
||||||
State = new ClientState(0, 0);
|
State = new ClientState(0, 0);
|
||||||
Rest = new DiscordSocketRestClient(config, ApiClient);
|
if (shardedClient is null || parentClient is null)
|
||||||
|
Rest = new DiscordSocketRestClient(config, ApiClient);
|
||||||
_heartbeatTimes = new ConcurrentQueue<long>();
|
_heartbeatTimes = new ConcurrentQueue<long>();
|
||||||
_gatewayIntents = config.GatewayIntents;
|
_gatewayIntents = config.GatewayIntents;
|
||||||
_defaultStickers = ImmutableArray.Create<StickerPack<SocketSticker>>();
|
_defaultStickers = ImmutableArray.Create<StickerPack<SocketSticker>>();
|
||||||
|
|||||||
Reference in New Issue
Block a user