Skip to content

Abdera7mane/discord-rpc-gdscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godot Discord RPC

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.

Features

  • Update Rich Presence status.
  • Subscribe to Discord client's event.
  • Non blocking RPC calls.

Examples

Checkout more examples here.

Rich Presence

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()
)

Installation

Release page

  1. Download the latest release from the release page.

  2. Extract the zip file at the root directory of your project.

Manual

  1. clone this repository git clone https://github.com/Abdera7mane/Discord-RPC-GDScript/

  2. Install the latest release of godot-unix-socket

  3. Make sure both addons are installed at the root directory of your project.