Lachee / discord-rpc-csharp

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

[FEATURE REQUEST] Add UpdateButton1 and UpdateButton2 #146

Closed HAHOOS closed 3 years ago

HAHOOS commented 3 years ago

@Lachee i see you added buttons, but there is no UpdateButton1 and UpdateButton2 like:

DiscordRpcClient client = new DiscordRpcClient("client-id");
client.UpdateButton1("label", "url");
client.UpdateButton2("label", "url");
Lachee commented 3 years ago

Because buttons are an array

HAHOOS commented 3 years ago

Oh so this will never be added?

Lachee commented 3 years ago

Not in the propersition you have presented. I tend to find it bad form to have Name1, Name2, Name3 etc.

If you had another suggestion on how to implement an update function for buttons, please share :)

HAHOOS commented 3 years ago

Ok

Founntain commented 3 years ago

Oh so this will never be added?

Just update them by overriding the array. If you added them and want to update the first one:

var btn1 = new Button();
btn1.Label = "your label";
btn1.Url = "your url";

presence.Buttons[0] = btn1;

That's how I do it and it works perfectly fine.

HAHOOS commented 3 years ago

Thanks for help!