Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abdera7mane/discord-rpc-gdscript
Discord RPC implementation in GDScript language
https://github.com/abdera7mane/discord-rpc-gdscript
addon discord discord-rpc discordrpc gdscript godot godot-engine godotengine plugin rich-presence richpresence
Last synced: 2 months ago
JSON representation
Discord RPC implementation in GDScript language
- Host: GitHub
- URL: https://github.com/abdera7mane/discord-rpc-gdscript
- Owner: Abdera7mane
- License: mit
- Created: 2021-05-16T22:50:25.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-15T21:33:18.000Z (11 months ago)
- Last Synced: 2024-10-10T22:37:41.970Z (3 months ago)
- Topics: addon, discord, discord-rpc, discordrpc, gdscript, godot, godot-engine, godotengine, plugin, rich-presence, richpresence
- Language: GDScript
- Homepage:
- Size: 84 KB
- Stars: 27
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Godot Discord RPC
This is a GDScript implementation of the deprecated [Discord RPC][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][discord-game-sdk] features.## Features
- Update Rich Presence status.
- Subscribe to Discord client's event.
- Non blocking RPC calls.## Examples
Checkout more examples [here](examples/).
### Rich Presence
A minimal Rich Presence example.
```gdscript
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.
```gdscript
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][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][godot-unix-socket]
3. Make sure both addons are installed at the root directory of your project.
[discord-rpc]: https://github.com/discord/discord-rpc/
[discord-game-sdk]: https://discord.com/developers/docs/game-sdk/sdk-starter-guide
[release-page]: https://github.com/Abdera7mane/Discord-RPC-GDScript/releases
[godot-unix-socket]: https://github.com/Abdera7mane/Godot-UnixSocket/