Getting started
Quick start
- Open the AssetLib tab in your Godot Editor.
Search for “discord” and install all the files from this plugin
Enable the addon in your Project Settings under “Plugins” and “DiscordRPC”.
(Also adds DiscordRPCLoader autoload wich should be ignored. It needs to run in the background to comunicate with the Discord client)
Restart your project with the window that should now appear.
- Create a Discord application Go to the Discord developer page linked here (keep the tab open), create a application with "New Application" and copy the Application ID.
While you’re here, head to the “OAuth2” section of your application and add
http://127.0.0.1
as a redirect URI for your application. (Discord says you should do that but it doesn’t change anything)(optional) Set images under “Rich Presence” and “Art Assets” and remember the keys
Create a gdscript wich gets run for example at startup wich looks something like the following
- Download the addon
Copy the folder from the zip file to the root of your Godot project like the following
Directoryaddons/
Directorydiscord-rpc-gd/ should contain this folder with these files
Directorybin/
- …
Directorynodes/
- …
- …
- plugin.cfg
- plugin.gd
- …
- restart_window.tscn
- …
- …
- icon.svg
- project.godot
Enable the addon in your Project Settings under “Plugins” and “DiscordRPC”.
(Also adds DiscordRPCLoader autoload wich should be ignored. It needs to run in the background to comunicate with the Discord client)
Restart your project with the window that should now appear.
- Create a Discord application Go to the Discord developer page linked here (keep the tab open), create a application with "New Application" and copy the Application ID.
While you’re here, head to the “OAuth2” section of your application and add
http://127.0.0.1
as a redirect URI for your application. (Discord says you should do that but it doesn’t change anything)(optional) Set images under “Rich Presence” and “Art Assets” and remember the keys
Create a gdscript wich gets run for example at startup wich looks something like the following
extends Nodefunc _ready():DiscordRPC.app_id = 1099618430065324082 # Application IDDiscordRPC.details = "A demo activity by vaporvee"DiscordRPC.state = "Checkpoint 23/23"DiscordRPC.large_image = "example_game" # Image key from "Art Assets"DiscordRPC.large_image_text = "Try it now!"DiscordRPC.small_image = "boss" # Image key from "Art Assets"DiscordRPC.small_image_text = "Fighting the end boss! D:"
DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system()) # "02:46 elapsed"# DiscordRPC.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time / "01:00:00 remaining"
DiscordRPC.refresh() # Always refresh after changing the values!
Then it will look similar to this:
Troubleshooting
First of all try reinstalling the plugin and restart both your Godot Editor and your Discord client.
I have no errors in my Godot console from the plugin but my Activity doesn’t show up in my Discord Client.
Make sure a DiscordSDK.run_callbacks()
function runs in a _process(delta)
function. This should happen in the Autoload added by the plugin. If it still doesn’t help, try the Demo above. If still nothing appears in your Discord profile card, you have to reset the depending settings in you Discord or reinstall it.
I have a lot of
Make sure the plugin is actually enabled. Then the plugin should work and after the second restart you shouldn’t get any errors from the plugin. But if it still gives you the errors delete this DiscordSDK not declared
errors spammed in my Godot Console and i can’t use the plugin..gdignore
file in your file explorer (will not be shown in the Godot Editor)
Directoryaddons/
Directorydiscord-rpc-gd/
Directorybin/
- .gdignore
- …
- …
- icon.svg
- project.godot
and restart the editor manually.