Added Available to IGuild
This commit is contained in:
@@ -303,6 +303,7 @@ namespace Discord
|
|||||||
|
|
||||||
private string DebuggerDisplay => $"{Name} ({Id})";
|
private string DebuggerDisplay => $"{Name} ({Id})";
|
||||||
|
|
||||||
|
bool IGuild.Available => false;
|
||||||
IRole IGuild.EveryoneRole => EveryoneRole;
|
IRole IGuild.EveryoneRole => EveryoneRole;
|
||||||
IReadOnlyCollection<Emoji> IGuild.Emojis => Emojis;
|
IReadOnlyCollection<Emoji> IGuild.Emojis => Emojis;
|
||||||
IReadOnlyCollection<string> IGuild.Features => Features;
|
IReadOnlyCollection<string> IGuild.Features => Features;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ namespace Discord
|
|||||||
string IconUrl { get; }
|
string IconUrl { get; }
|
||||||
/// <summary> Returns the url to this guild's splash image, or null if one is not set. </summary>
|
/// <summary> Returns the url to this guild's splash image, or null if one is not set. </summary>
|
||||||
string SplashUrl { get; }
|
string SplashUrl { get; }
|
||||||
|
/// <summary> Returns true if this guild is currently connected and ready to be used. Only applies to the WebSocket client. </summary>
|
||||||
|
bool Available { get; }
|
||||||
|
|
||||||
/// <summary> Gets the id of the AFK voice channel for this guild if set, or null if not. </summary>
|
/// <summary> Gets the id of the AFK voice channel for this guild if set, or null if not. </summary>
|
||||||
ulong? AFKChannelId { get; }
|
ulong? AFKChannelId { get; }
|
||||||
@@ -90,7 +92,7 @@ namespace Discord
|
|||||||
Task<IGuildUser> GetUserAsync(ulong id);
|
Task<IGuildUser> GetUserAsync(ulong id);
|
||||||
/// <summary> Gets the current user for this guild. </summary>
|
/// <summary> Gets the current user for this guild. </summary>
|
||||||
Task<IGuildUser> GetCurrentUserAsync();
|
Task<IGuildUser> GetCurrentUserAsync();
|
||||||
/// <summary> Downloads all users for this guild if the current list is incomplete. </summary>
|
/// <summary> Downloads all users for this guild if the current list is incomplete. Only applies to the WebSocket client. </summary>
|
||||||
Task DownloadUsersAsync();
|
Task DownloadUsersAsync();
|
||||||
/// <summary> Removes all users from this guild if they have not logged on in a provided number of days or, if simulate is true, returns the number of users that would be removed. </summary>
|
/// <summary> Removes all users from this guild if they have not logged on in a provided number of days or, if simulate is true, returns the number of users that would be removed. </summary>
|
||||||
Task<int> PruneUsersAsync(int days = 30, bool simulate = false);
|
Task<int> PruneUsersAsync(int days = 30, bool simulate = false);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Discord
|
|||||||
private ConcurrentDictionary<ulong, Presence> _presences;
|
private ConcurrentDictionary<ulong, Presence> _presences;
|
||||||
private ConcurrentDictionary<ulong, VoiceState> _voiceStates;
|
private ConcurrentDictionary<ulong, VoiceState> _voiceStates;
|
||||||
|
|
||||||
public bool Available { get; private set; } //TODO: Add to IGuild
|
public bool Available { get; private set; }
|
||||||
public int MemberCount { get; private set; }
|
public int MemberCount { get; private set; }
|
||||||
public int DownloadedMemberCount { get; private set; }
|
public int DownloadedMemberCount { get; private set; }
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ namespace Discord
|
|||||||
if (model.VoiceStates != null)
|
if (model.VoiceStates != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < model.VoiceStates.Length; i++)
|
for (int i = 0; i < model.VoiceStates.Length; i++)
|
||||||
AddOrUpdateCachedVoiceState(model.VoiceStates[i], _voiceStates);
|
AddOrUpdateCachedVoiceState(model.VoiceStates[i], voiceStates);
|
||||||
}
|
}
|
||||||
_voiceStates = voiceStates;
|
_voiceStates = voiceStates;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user