Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/discord-net/Discord.Net into…
Browse files Browse the repository at this point in the history
… dev
  • Loading branch information
quinchs committed Jan 30, 2022
2 parents fddaac9 + 09eb9fa commit e19ad28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Discord.Net.WebSocket/DiscordSocketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2913,6 +2913,9 @@ internal void EnsureGatewayIntent(GatewayIntents intents)
}
}

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

private async Task GuildAvailableAsync(SocketGuild guild)
{
if (!guild.IsConnected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public virtual async Task<SocketThreadChannel> CreateThreadAsync(string name, Th

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

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

return thread;
}
Expand Down

0 comments on commit e19ad28

Please sign in to comment.