fix exception not being logged (#2800)
This commit is contained in:
@@ -648,7 +648,6 @@ namespace Discord.WebSocket
|
|||||||
if (ConnectionState == ConnectionState.Connected)
|
if (ConnectionState == ConnectionState.Connected)
|
||||||
{
|
{
|
||||||
EnsureGatewayIntent(GatewayIntents.GuildMembers);
|
EnsureGatewayIntent(GatewayIntents.GuildMembers);
|
||||||
|
|
||||||
//Race condition leads to guilds being requested twice, probably okay
|
//Race condition leads to guilds being requested twice, probably okay
|
||||||
return ProcessUserDownloadsAsync(guilds.Select(x => GetGuild(x.Id)).Where(x => x != null));
|
return ProcessUserDownloadsAsync(guilds.Select(x => GetGuild(x.Id)).Where(x => x != null));
|
||||||
}
|
}
|
||||||
@@ -997,7 +996,14 @@ namespace Discord.WebSocket
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (BaseConfig.AlwaysDownloadUsers)
|
if (BaseConfig.AlwaysDownloadUsers)
|
||||||
|
try
|
||||||
|
{
|
||||||
_ = DownloadUsersAsync(Guilds.Where(x => x.IsAvailable && !x.HasAllMembers));
|
_ = DownloadUsersAsync(Guilds.Where(x => x.IsAvailable && !x.HasAllMembers));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await _gatewayLogger.WarningAsync(ex);
|
||||||
|
}
|
||||||
|
|
||||||
await TimedInvokeAsync(_readyEvent, nameof(Ready)).ConfigureAwait(false);
|
await TimedInvokeAsync(_readyEvent, nameof(Ready)).ConfigureAwait(false);
|
||||||
await _gatewayLogger.InfoAsync("Ready").ConfigureAwait(false);
|
await _gatewayLogger.InfoAsync("Ready").ConfigureAwait(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user