feature: Handle bidirectional usernames (#1943)

* Initial implementation

* Update summary
This commit is contained in:
Quin Lynch
2021-11-25 11:24:44 -04:00
committed by GitHub
parent 143ca6db43
commit 10afd96e6e
3 changed files with 14 additions and 4 deletions

View File

@@ -109,8 +109,8 @@ namespace Discord.WebSocket
/// <returns>
/// The full name of the user.
/// </returns>
public override string ToString() => $"{Username}#{Discriminator}";
private string DebuggerDisplay => $"{Username}#{Discriminator} ({Id}{(IsBot ? ", Bot" : "")})";
public override string ToString() => Format.UsernameAndDiscriminator(this);
private string DebuggerDisplay => $"{Format.UsernameAndDiscriminator(this)} ({Id}{(IsBot ? ", Bot" : "")})";
internal SocketUser Clone() => MemberwiseClone() as SocketUser;
}
}