Browse Source

Fixed Server.CurrentMember, renamed to CurrentUser

tags/docs-0.9
RogueException 9 years ago
parent
commit
2f666bcd47
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      src/Discord.Net/Models/Server.cs
  2. +4
    -4
      src/Discord.Net/Models/User.cs

+ 1
- 1
src/Discord.Net/Models/Server.cs View File

@@ -12,7 +12,7 @@ namespace Discord
/// <summary> Returns the name of this channel. </summary> /// <summary> Returns the name of this channel. </summary>
public string Name { get; private set; } public string Name { get; private set; }
/// <summary> Returns the current logged-in user's data for this server. </summary> /// <summary> Returns the current logged-in user's data for this server. </summary>
public User CurrentMember { get; internal set; }
public User CurrentUser { get; internal set; }


/// <summary> Returns the amount of time (in seconds) a user must be inactive for until they are automatically moved to the AFK channel (see AFKChannel). </summary> /// <summary> Returns the amount of time (in seconds) a user must be inactive for until they are automatically moved to the AFK channel (see AFKChannel). </summary>
public int AFKTimeout { get; private set; } public int AFKTimeout { get; private set; }


+ 4
- 4
src/Discord.Net/Models/User.cs View File

@@ -121,14 +121,14 @@ namespace Discord
x => x =>
{ {
x.AddMember(this); x.AddMember(this);
if (x.Id == _client.CurrentUserId)
x.CurrentMember = this;
if (Id == _client.CurrentUserId)
x.CurrentUser = this;
}, },
x => x =>
{ {
x.RemoveMember(this); x.RemoveMember(this);
if (x.Id == _client.CurrentUserId)
x.CurrentMember = null;
if (Id == _client.CurrentUserId)
x.CurrentUser = null;
}); });
Status = UserStatus.Offline; Status = UserStatus.Offline;
_channels = new ConcurrentDictionary<string, Channel>(); _channels = new ConcurrentDictionary<string, Channel>();


Loading…
Cancel
Save