Lachee / discord-rpc-csharp

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

Disconnecting and Reconnecting to RPC #242

Closed OssieFromDK closed 7 months ago

OssieFromDK commented 7 months ago

It seems that the .Deinitialize() method closes the connection for good, and you can't reconnect again using Initiliaze()?

Is this meant to happen, if so, how would you disconnect and later reconnect to the RPC multiple times?

OssieFromDK commented 7 months ago

Ended up using this package instead, it has the use I needed.

Lachee commented 7 months ago

It seems that the .Deinitialize() method closes the connection for good, and you can't reconnect again using Initiliaze()?

Is this meant to happen, if so, how would you disconnect and later reconnect to the RPC multiple times?

You are not suppose to, the Rich Presence on Discord side expects the application to be connected throughout the lifetime of the application.

As for the other package is kinda rude.... This project is open source and welcomes contributions. If there is a better way to handle things, make pull requests to this repository and help improve this library.

OssieFromDK commented 7 months ago

It seems that the .Deinitialize() method closes the connection for good, and you can't reconnect again using Initiliaze()?

Is this meant to happen, if so, how would you disconnect and later reconnect to the RPC multiple times?

You are not suppose to, the Rich Presence on Discord side expects the application to be connected throughout the lifetime of the application.

As for the other package is kinda rude....

This project is open source and welcomes contributions. If there is a better way to handle things, make pull requests to this repository and help improve this library.

Hello, I'm not looking to stop the connection, but instead clear the presence temporarely, I couldn't find anything that did such in this project. I don't see the purpose if Deinitialize(), if its just the same as .Dispose(), in terms of closing the connection.

Regarding using something else, this was just something I needed rather quickly, and after looking at another issue on this repo, with a guy that had the same problem as me, I just went and found another package (wich is also open source), that does what I need, instead of having to spend time learning the code base to implement the feature in this.

Lachee commented 7 months ago

Hello, I'm not looking to stop the connection, but instead clear the presence temporarely, I couldn't find anything that did such in this project. I don't see the purpose if Deinitialize(), if its just the same as .Dispose(), in terms of closing the connection.

Oh i believe you can just send a null presence. It will still say "playing x game" however, that cannot be disabled as it is tied to the PID of the application. I'll verify this shortly.

Regarding using something else yeah not accusing you of anything. I was speaking broadly about that library. I apologise, i dont mean anything personal about it :3