Lachee / discord-rpc-csharp

C# custom implementation for Discord Rich Presence. Not deprecated and still available!
MIT License
560 stars 93 forks source link

[BUG] Discrim Does Not Show 0's #162

Closed ImmuneLion318 closed 2 years ago

ImmuneLion318 commented 2 years ago

Uh So After Initialization Of The Presence During The OnReady Event I Send To My Websocket CurrentUser.Username And Discriminator But The Discriminator Dosen't Appear To Show Any Of The 0's So My User Comes Up As {User}1 Rather Than The Appropriate Format Of {User}0001 Any Help Would Be Appreciated

Lachee commented 2 years ago

Use the User.ToString function to display a user as username#discrim just like discord.

If you only want the formatted discrim, look at the Source Code for that function.

TL;DR its a standard C# formatting you can apply to the integer to get "left padding"