Browse Source

Exposed Client.AllUsers

tags/docs-0.9
RogueException 9 years ago
parent
commit
fac8b1ded9
2 changed files with 5 additions and 6 deletions
  1. +2
    -1
      src/Discord.Net/DiscordClient.Users.cs
  2. +3
    -5
      src/Discord.Net/Models/GlobalUser.cs

+ 2
- 1
src/Discord.Net/DiscordClient.Users.cs View File

@@ -136,7 +136,8 @@ namespace Discord
/// <summary> Returns information about the currently logged-in account. </summary>
public GlobalUser CurrentUser => _privateUser.GlobalUser;

/// <summary> Returns a collection of all users this client can currently see. </summary>
/// <summary> Returns a collection of all unique users this client can currently see. </summary>
public IEnumerable<GlobalUser> AllUsers => _globalUsers;
internal GlobalUsers GlobalUsers => _globalUsers;
private readonly GlobalUsers _globalUsers;



+ 3
- 5
src/Discord.Net/Models/GlobalUser.cs View File

@@ -10,12 +10,10 @@ namespace Discord
{
private readonly ConcurrentDictionary<long, User> _users;

/// <summary> Returns the email for this user. </summary>
/// <remarks> This field is only ever populated for the current logged in user. </remarks>
/// <summary> Returns the email for this user. Note: this field is only ever populated for the current logged in user. </summary>
[JsonIgnore]
public string Email { get; private set; }
/// <summary> Returns if the email for this user has been verified. </summary>
/// <remarks> This field is only ever populated for the current logged in user. </remarks>
/// <summary> Returns if the email for this user has been verified. Note: this field is only ever populated for the current logged in user. </summary>
[JsonIgnore]
public bool? IsVerified { get; private set; }

@@ -35,7 +33,7 @@ namespace Discord

/// <summary> Returns a collection of all server-specific data for every server this user is a member of. </summary>
[JsonIgnore]
internal IEnumerable<User> Memberships => _users.Select(x => x.Value);
public IEnumerable<User> Memberships => _users.Select(x => x.Value);

internal GlobalUser(DiscordClient client, long id)
: base(client, id)


Loading…
Cancel
Save