Lachee / discord-rpc-csharp

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

C# Visual Studio 2019 Update Presence #78

Closed Nekiplay closed 4 years ago

Nekiplay commented 4 years ago

How can I install Presence and then update it with different text?

My code looks something like this

var client = new DotnetRPC.RpcClient("appid", true, Assembly.GetExecutingAssembly().Location); try { client.Ready += async args => { await client.SetActivityAsync(x => { x.Details = "Онлайн: " + textBox1.Text; x.State = "Online"; x.StartUnix = 0; x.EndUnix = 0; x.LargeImage = "12"; x.LargeImageText = "12"; x.SmallImage = "12"; x.SmallImageText = "12"; x.CurrentPartySize = 0; x.MaxPartySize = 0; x.PartyId = ""; }); }; await client.ConnectAsync(); await Task.Delay(15000); client.Dispose(); await Task.Delay(15000);

Lachee commented 4 years ago

You are using a different library. To install this library, please read the readme.md https://github.com/Lachee/discord-rpc-csharp#installation