discord-rpc-godot: Game fails to launch after a few runs

I downloaded the 1.2 version of the addon and created this simple script:

func _ready():
      if Discord_Activity.get_is_discord_working():
            print("Discord is working")
            Discord_Activity.app_id = <my id>
            Discord_Activity.large_image = "main_icon"
            Discord_Activity.start_timestamp = int(Time.get_unix_time_from_system())
            Discord_Activity.refresh()
      else:
            print("Discord is not working")

Everything worked fine, but after running the project a few times, opening the game from any scene would show a black screen and the game would crash without any error in the console or debugger. I then tested only this code:

func _ready():
      Discord_Activity.app_id = <my id>
      Discord_Activity.refresh()

But it did the same thing. Then I tried removing the code entirely, yet the same thing kept happening. I then disabled the addon, but it still kept crashing. I tried restarting the editor, but that didn’t help. It wasn’t until i completely removed the addon files that I could finally launch the game again with no problems.

Godot version: v4.0.2.stable.official [7a0977ce2]

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Well, it’s a private project for now, but I do plan on releasing it publicly someday 😃