fix: SocketGuild.HasAllMembers is false if a user left a guild (#1683)

* Fix: HasAllMembers is false if a user left

* Fix: Correct boolean logic
This commit is contained in:
Daniel Baynton
2020-12-14 03:55:03 +00:00
committed by GitHub
parent aacfea05ea
commit 47f571ef1c

View File

@@ -136,7 +136,7 @@ namespace Discord.WebSocket
/// <inheritdoc /> /// <inheritdoc />
public string BannerUrl => CDN.GetGuildBannerUrl(Id, BannerId); public string BannerUrl => CDN.GetGuildBannerUrl(Id, BannerId);
/// <summary> Indicates whether the client has all the members downloaded to the local guild cache. </summary> /// <summary> Indicates whether the client has all the members downloaded to the local guild cache. </summary>
public bool HasAllMembers => MemberCount == DownloadedMemberCount;// _downloaderPromise.Task.IsCompleted; public bool HasAllMembers => MemberCount <= DownloadedMemberCount;// _downloaderPromise.Task.IsCompleted;
/// <summary> Indicates whether the guild cache is synced to this guild. </summary> /// <summary> Indicates whether the guild cache is synced to this guild. </summary>
public bool IsSynced => _syncPromise.Task.IsCompleted; public bool IsSynced => _syncPromise.Task.IsCompleted;
public Task SyncPromise => _syncPromise.Task; public Task SyncPromise => _syncPromise.Task;