Added discriminator to User.ToString and Channel.ToString (when private)
This commit is contained in:
@@ -123,8 +123,8 @@ namespace Discord
|
||||
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