[Issue/Bug]: Rich Presence not updating correctly without DiscordRPC.clear(false) #74

Closed
opened 2024-10-18 08:20:31 +00:00 by asiadwn · 3 comments
asiadwn commented 2024-10-18 08:20:31 +00:00 (Migrated from github.com)

What happened?

Bug Report: Rich Presence not updating correctly without DiscordRPC.clear(false)
Note:
I have never reported a bug on GitHub before, so I apologize if I’m not doing it correctly.

Bug description: The Discord Rich Presence does not update correctly unless the DiscordRPC.clear(false) command is used before every change. This causes the activity in Discord to restart entirely every time, making it appear as though it resets on each update. Without using clear(), the information doesn't change at all.

Expected behavior: The Rich Presence information should update smoothly without needing to call DiscordRPC.clear(false) and without restarting the entire activity in Discord.

Current behavior: The Rich Presence only updates correctly if DiscordRPC.clear(false) is used, which causes the activity in Discord to reset on each update. Without the command, the information remains unchanged.

Version

1.3.1

Godot Version

4.3

Exact steps to reproduce this error

  1. Initialize DiscordRPC without calling DiscordRPC.clear(false).
  2. Attempt to update the Rich Presence information with new data.
  3. Observe that Discord does not update the information.
  4. When using DiscordRPC.clear(false) before each update, the information changes, but the activity resets completely.

GDScript

func _ready():
	DiscordRPC.clear(false)
	DiscordRPC.app_id = 1099618430065324082
	DiscordRPC.details = "In the menu"
	DiscordRPC.state = "In the menu"
	DiscordRPC.large_image = "menu"
	DiscordRPC.large_image_text = "menu"
	DiscordRPC.refresh()

Godot output

No response

Additional information

I’ve noticed that other games manage to update the Rich Presence continuously without this abrupt change.

Checks

### What happened? Bug Report: Rich Presence not updating correctly without DiscordRPC.clear(false) Note: I have never reported a bug on GitHub before, so I apologize if I’m not doing it correctly. Bug description: The Discord Rich Presence does not update correctly unless the DiscordRPC.clear(false) command is used before every change. This causes the activity in Discord to restart entirely every time, making it appear as though it resets on each update. Without using clear(), the information doesn't change at all. Expected behavior: The Rich Presence information should update smoothly without needing to call DiscordRPC.clear(false) and without restarting the entire activity in Discord. Current behavior: The Rich Presence only updates correctly if DiscordRPC.clear(false) is used, which causes the activity in Discord to reset on each update. Without the command, the information remains unchanged. ### Version 1.3.1 ### Godot Version 4.3 ### Exact steps to reproduce this error 1. Initialize DiscordRPC without calling DiscordRPC.clear(false). 2. Attempt to update the Rich Presence information with new data. 3. Observe that Discord does not update the information. 4. When using DiscordRPC.clear(false) before each update, the information changes, but the activity resets completely. ### GDScript ```gdscript func _ready(): DiscordRPC.clear(false) DiscordRPC.app_id = 1099618430065324082 DiscordRPC.details = "In the menu" DiscordRPC.state = "In the menu" DiscordRPC.large_image = "menu" DiscordRPC.large_image_text = "menu" DiscordRPC.refresh() ``` ### Godot output _No response_ ### Additional information I’ve noticed that other games manage to update the Rich Presence continuously without this abrupt change. ### Checks - [X] I tried reinstalling the addon or tried to fix it myself with other methods. - [X] I tried restarting Discord and Godot completely. - [X] I did read the documentation https://vaporvee.com/docs/discord-rpc-godot/

Try to not set the app_id. It should only be set on the beginning as initialization.

Try to not set the app_id. It should only be set on the beginning as initialization.
asiadwn commented 2024-10-18 20:16:28 +00:00 (Migrated from github.com)

Thank you for the suggestion! It worked perfectly everything is now updating smoothly without having to reset the app_id.
I still have one question, though. If I initialize DiscordRPC.start_timestamp in one scene, how can I remove or stop it in another scene?
Thanks again for your help!

Thank you for the suggestion! It worked perfectly everything is now updating smoothly without having to reset the app_id. I still have one question, though. If I initialize DiscordRPC.start_timestamp in one scene, how can I remove or stop it in another scene? Thanks again for your help!

It should reset when set to 0 but would need to look at my code for this one

It should reset when set to 0 but would need to look at my code for this one
Sign in to join this conversation.
No description provided.