Added discriminator to User.ToString and Channel.ToString (when private)
This commit is contained in:
@@ -120,11 +120,11 @@ namespace Discord
|
||||
x => x.AddChannel(this),
|
||||
x => x.RemoveChannel(this));
|
||||
_recipient = new Reference<User>(recipientId,
|
||||
x => _client.Users.GetOrAdd(x, _server.Id),
|
||||
x => _client.Users.GetOrAdd(x, _server.Id),
|
||||
x =>
|
||||
{
|
||||
Name = "@" + x.Name;
|
||||
if (_server.Id == null)
|
||||
Name = $"@{x}";
|
||||
if (_server.Id == null)
|
||||
x.Global.PrivateChannel = this;
|
||||
},
|
||||
x =>
|
||||
|
||||
@@ -281,6 +281,6 @@ namespace Discord
|
||||
|
||||
public override bool Equals(object obj) => obj is User && (obj as User).Id == Id;
|
||||
public override int GetHashCode() => unchecked(Id.GetHashCode() + 7230);
|
||||
public override string ToString() => Name ?? IdConvert.ToString(Id);
|
||||
public override string ToString() => Name != null ? $"{Name}#{Discriminator}" : IdConvert.ToString(Id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user