This is a GDScript implementation of the deprecated Discord RPC for interfacing with the Discord client from your application. This tool is for you if you don't need the full set of Discord GameSDK features.
- Update Rich Presence status.
- Subscribe to Discord client's event.
- Non blocking RPC calls.
Checkout more examples here.
A minimal Rich Presence example.
var discord := DiscordRPC.new()
# ...
# Establish a connection and wait for rpc_ready signal
# ...
await discord.update_presence({
details = "In 2D workspace",
state = "Idle",
assets = {
large_image = "icon"
}
})
The same example but with a Rich Presence builder.
await discord.update_presence(
RichPresenceBuilder.new()\
.with_details("In 2D workspace")\
.with_state("Idle")\
.with_large_image("icon")\
.build()
)
-
Download the latest release from the release page.
-
Extract the zip file at the root directory of your project.
-
clone this repository
git clone https://github.com/Abdera7mane/Discord-RPC-GDScript/
-
Install the latest release of godot-unix-socket
-
Make sure both addons are installed at the root directory of your project.