discord-rpc-csharp icon indicating copy to clipboard operation
discord-rpc-csharp copied to clipboard

[FEATURE REQUEST] Add AddButton and RemoveButton

Open HAHOOS opened this issue 4 years ago • 15 comments

Hello again, I have another thing that could be added, which is AddButton and RemoveButton like:

DiscordRpcClient client = new DiscordRpcClient("client-id");
client.AddButton("label", "url");
client.RemoveButton(index); //index is int

HAHOOS avatar Jun 24 '21 10:06 HAHOOS

oh i forgot to mension @Lachee

HAHOOS avatar Jun 25 '21 15:06 HAHOOS

Please, add it. I need it in my project <3

zoriV avatar Jul 04 '21 20:07 zoriV

how i can add butons plis help

Mrgaton avatar Jul 19 '21 18:07 Mrgaton

image

Mrgaton avatar Jul 19 '21 18:07 Mrgaton

if you want do like that, you can try this:

var btn1 = new Button();

btn1.Label = "Test"
btn1.Url = "Uri"
presence.Buttons[0] = btn1

But when i try it doesn't work

HAHOOS avatar Jul 19 '21 19:07 HAHOOS

if you want do like that, you can try this:

var btn1 = new Button();

btn1.Label = "Test"
btn1.Url = "Uri"
presence.Buttons[0] = btn1

But when i try it doesn't work

what do you mean "doesn't work". Please provide more details

@Mrgaton it needs to be an array

Lachee avatar Jul 20 '21 04:07 Lachee

if you want do like that, you can try this:

var btn1 = new Button();

btn1.Label = "Test"
btn1.Url = "Uri"
presence.Buttons[0] = btn1

But when i try it doesn't work

what do you mean "doesn't work". Please provide more details

@Mrgaton it needs to be an array

i dont now how to do thath can u show me code plis im new in c# image

Mrgaton avatar Jul 20 '21 05:07 Mrgaton

if you want do like that, you can try this:

var btn1 = new Button();

btn1.Label = "Test"
btn1.Url = "Uri"
presence.Buttons[0] = btn1

But when i try it doesn't work

what do you mean "doesn't work". Please provide more details @Mrgaton it needs to be an array

i dont now how to do thath can u show me code plis im new in c# image

its an array... you need to declare an array. https://www.tutorialsteacher.com/csharp/array-csharp

Lachee avatar Jul 20 '21 05:07 Lachee

image Like this?

can u help me in discord please i have more questions I'm sorry for the inconvenience but I'm not good at programming in this programming language so I don't understand how it goes and I'm still not used to using libraries

Mrgaton avatar Jul 20 '21 07:07 Mrgaton

@Mrgaton, I do not help with introductory programming questions in discord or as issues. I expect users of my libraries and tools to know at least basic C# and programming. I just don't have the time to help every possible beginner, sorry 😢.

There are plenty of resources online to get you started and the examples show you how to do it 🤨

Please do some research outside this issue.

Lachee avatar Jul 20 '21 07:07 Lachee

:o thath example is what i need it thanks for solving my problem

one more question than what timestamp is it?

image Thanks <3

Mrgaton avatar Jul 20 '21 07:07 Mrgaton

o okey sory i now what is timestamp

Mrgaton avatar Jul 20 '21 07:07 Mrgaton

Okey u are awesome Lachee

Mrgaton avatar Jul 20 '21 08:07 Mrgaton

and i think i found an iuse image In mi discord tag i have the discriminator 0001 and in console only shows 1 this is the code image

Mrgaton avatar Jul 20 '21 09:07 Mrgaton

and i think i found an iuse image In mi discord tag i have the discriminator 0001 and in console only shows 1 this is the code image

see issue #150 Issue locked to prevent further off-topic conversation

Lachee avatar Jul 21 '21 00:07 Lachee