Lachee / discord-rpc-csharp

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

[Question] How to do line feed in State (Rich Presence)? #132

Closed Ts-Pytham closed 3 years ago

Ts-Pytham commented 3 years ago

I have a problem, i'm trying to separate 2 texts, the first one with the song name and the second one with the author name but, when i use a line feed between these texts it doesn't seen separated when i check it on Discord but i can see the line feed applied when i put the cursor over the text. Example image

A example on Spotify it seens like this:

image

Lachee commented 3 years ago

if \n doesnt work in the text, then discord doesnt support new lines. Unfortunately there is nothing this library can do to resolve that.

Ts-Pytham commented 3 years ago

Is it possible that in the future it will be implemented this option?

youknowedo commented 3 years ago

You should put the song name in Details and the artist in State. That is the only way you could make a line break in discord rpc

MistressPlague commented 3 years ago

You need to use Enviroment.NewLine. I know as I use this for my presence and it works.

Ts-Pytham commented 3 years ago

You need to use Enviroment.NewLine. I know as I use this for my presence and it works.

It didn't work, I show you my code: discordRP.Details = "Escuchando: "; discordRP.State = $"{TextBlock_Author_Name.Text}{Environment.NewLine}{Name_Music.Text}";

Image:

image

Ts-Pytham commented 3 years ago

You should put the song name in Details and the artist in State. That is the only way you could make a line break in discord rpc

For now that is the solution.

Kein commented 3 years ago

There is no linebreaks, it just the title of the app is also seems to be changed (so they have title, state and details to use) I dont belive mere mortals can do it, but Spotify is a different talk, guess Discord allow big guy to send title for changes as well.