diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index 8cef89821..5225e9379 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -2913,6 +2913,9 @@ namespace Discord.WebSocket } } + internal bool HasGatewayIntent(GatewayIntents intents) + => _gatewayIntents.HasFlag(intents); + private async Task GuildAvailableAsync(SocketGuild guild) { if (!guild.IsConnected) diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs index 55085899d..dbf238625 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs @@ -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; }