Browse Source

Fix thread member download on create (#2072)

tags/3.2.1^2
Quin Lynch GitHub 3 years ago
parent
commit
09eb9facba
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions
  1. +3
    -0
      src/Discord.Net.WebSocket/DiscordSocketClient.cs
  2. +2
    -1
      src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs

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

@@ -2913,6 +2913,9 @@ namespace Discord.WebSocket
}
}

internal bool HasGatewayIntent(GatewayIntents intents)
=> _gatewayIntents.HasFlag(intents);

private async Task GuildAvailableAsync(SocketGuild guild)
{
if (!guild.IsConnected)


+ 2
- 1
src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs View File

@@ -119,7 +119,8 @@ namespace Discord.WebSocket

var thread = (SocketThreadChannel)Guild.AddOrUpdateChannel(Discord.State, model);

await thread.DownloadUsersAsync();
if(Discord.AlwaysDownloadUsers && Discord.HasGatewayIntent(GatewayIntents.GuildMembers))
await thread.DownloadUsersAsync();

return thread;
}


Loading…
Cancel
Save