[Issue/Bug]: Avoiding "Discord Activity couldn't be updated" warning message #71
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened?
I call
DiscordRPC.refresh
every 3 seconds or so, but if Discord is not launched, I get the following warning message every time the function is called:Now, this is fine, but is there any way to avoid having this warning message in the console, perhaps by detecting if Discord is launched/can be updated, and only calling
refresh
when needed.Version
1.3.1
Godot Version
4.3.stable.official
Exact steps to reproduce this error
Example reproduction code, should be ran while Discord isn't launched:
GDScript
Godot output
No response
Additional information
No response
Checks
This isn't a bug, more like an issue or suggestion.
Nope you are using it extremely wrong. You shouldn't refresh every 3 seconds first of all and also there is
DiscordRPC.get_is_discord_working()
. Refreshing it every 3 seconds overloads the rpc server and wouldn't work. Also why are you updating the same Activity all the time? Does it dissapear for some reason?Okay, I come from a different DiscordRPC lib from a different language and this is how I did it there, I didn't expect it to be different here. What would be the correct way to do it?
I'm updating things like the current level the player is in, whether the player is in a menu, which can change rapidly. Should I only update and refresh when there is an actual change? It seems to work though. Why would this overload the RPC servers?
This is mentioned nowhere in the docs. I'd highly appreciate if there was a page in the docs with a complete reference of all the API's functions, it would be of great help. 😄
DiscordRPC.get_is_discord_working()
is the only function missing in the docs will add that though. There is arun_callbacks
in a autoload automatically installed which must be the thing you where seeing in other libs. Only update those things in signals if you can. The thing is the RPC server from Discord is really buggy. Its not reliable at all and a complete mess. When you rapidly change the activity and it still shows up or not doesn't mean it shows for other users so just do it the right way initially.Okay, I see. I'll change my code so that it only calls refresh in reaction to signals, thanks a lot for your help 👍
No problem :)