Browse Source

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
tags/3.3.1
Armano den Boef GitHub 3 years ago
parent
commit
6039378c52
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 2
- 1
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -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 is null || parentClient is null)
Rest = new DiscordSocketRestClient(config, ApiClient);
_heartbeatTimes = new ConcurrentQueue<long>();
_gatewayIntents = config.GatewayIntents;
_defaultStickers = ImmutableArray.Create<StickerPack<SocketSticker>>();


Loading…
Cancel
Save