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 => _client.Users.GetOrAdd(x, _server.Id),
|
||||||
x =>
|
x =>
|
||||||
{
|
{
|
||||||
Name = "@" + x.Name;
|
Name = $"@{x}";
|
||||||
if (_server.Id == null)
|
if (_server.Id == null)
|
||||||
x.Global.PrivateChannel = this;
|
x.Global.PrivateChannel = this;
|
||||||
},
|
},
|
||||||
x =>
|
x =>
|
||||||
|
|||||||
@@ -281,6 +281,6 @@ namespace Discord
|
|||||||
|
|
||||||
public override bool Equals(object obj) => obj is User && (obj as User).Id == Id;
|
public override bool Equals(object obj) => obj is User && (obj as User).Id == Id;
|
||||||
public override int GetHashCode() => unchecked(Id.GetHashCode() + 7230);
|
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