Browse Source

fix: handicap member downloading for verified bots (#1647)

tags/2.3.0
Paulo GitHub 4 years ago
parent
commit
fa5ef5e1c6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

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

@@ -370,7 +370,7 @@ namespace Discord.WebSocket
{ {
var cachedGuilds = guilds.ToImmutableArray(); var cachedGuilds = guilds.ToImmutableArray();


const short batchSize = 100; //TODO: Gateway Intents will limit to a maximum of 1 guild_id
int batchSize = _gatewayIntents.HasValue ? 1 : 100;
ulong[] batchIds = new ulong[Math.Min(batchSize, cachedGuilds.Length)]; ulong[] batchIds = new ulong[Math.Min(batchSize, cachedGuilds.Length)];
Task[] batchTasks = new Task[batchIds.Length]; Task[] batchTasks = new Task[batchIds.Length];
int batchCount = (cachedGuilds.Length + (batchSize - 1)) / batchSize; int batchCount = (cachedGuilds.Length + (batchSize - 1)) / batchSize;


Loading…
Cancel
Save