32 Replies
What's the error?
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Well there you go
Probably no current user
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Are you? So you verified current user is not null?
looks like you may need to subscribe to the ready event before accessing some objects
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
and also initialize the client
the github repo has some examples on how to use it
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Try to subscribe to
OnReady
before running this codeUnknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
As you can see in the source code
CurrentUser
is set and later OnReady is invokedGitHub
discord-rpc-csharp/DiscordRpcClient.cs at 44555277e8c818beb34e3a6cf...
C# custom implementation for Discord Rich Presence. Not deprecated and still available! - discord-rpc-csharp/DiscordRpcClient.cs at 44555277e8c818beb34e3a6cffe8b2f23cb07661 · Lachee/discord-rpc-cs...
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Have you tried adding a logger as well?
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
try subscribe to the event before calling Initialize
as you may be subscribing after the client is ready
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
you need to provide the error, and probably more code than you are showing
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Initialize();
calls Initialize();
on drpcclient
?where is your rpc instantiation and Initialize looks like it is not called on your RPC
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
And is
drpcclient
even initialized?this looks like the constructor for a WPF Window
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
right, you are trying to subscribe to an event before you even instantiate DiscordRpc as well
looks like you're trying to subscribe twice
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
That command had an error
UnknownCommand: Unknown command.
Remove your reaction to delete this message
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
look into binding and INotifyPropertyChanged
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View