Browse Source

Fix for Issue #1471

This change will allow `GuildAvailable` to fire when the client joins a new guild, as well as properly update `IsConnected`.
pull/1473/head
TheKingEagle GitHub 5 years ago
parent
commit
2ba04dfc84
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

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

@@ -627,6 +627,10 @@ namespace Discord.WebSocket
var guild = AddGuild(data, State);
if (guild != null)
{
if (_unavailableGuildCount != 0)
_unavailableGuildCount--;
await GuildAvailableAsync(guild).ConfigureAwait(false);
await TimedInvokeAsync(_joinedGuildEvent, nameof(JoinedGuild), guild).ConfigureAwait(false);
}
else


Loading…
Cancel
Save