Discord Game SDK

An asset by samsface
The page banner background of a mountain and forest
Discord Game SDK hero image

Quick Information

0 ratings
Discord Game SDK icon image
samsface
Discord Game SDK

Use the Discord Game SDK from GDSscript. Supports Windows, Linux & MacOS (x86_x64 only).Features:- Set Rich Presence- Start Game Lobbies using Discord Networking- Invite friends to Lobbies through Discord.

Supported Engine Version
3.4
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Godot-Discord-Game-SDK 🥏🎶

Godot Discord Game SDK integration using GDNative. Supports 💰Windows & 🐧Linux.

Getting Started

  1. Download the example project.
  2. Download the Discord Game SDK following the offical Discord Game SDK documenation and extract any .so, .dll or .dylib files into the sample project's addons/discord_game_sdk directory.
  3. Start the sample project! The Godot API is verbatim almost to the offical API so just follow the offical documenation.

Or checkout this little tutorial on getting started:

README Watch the video

Snippets

Updating activity

func update_activity() -> void:
    var activity = Discord.Activity.new()
    activity.set_type(Discord.ActivityType.Playing)
    activity.set_state("Reached: 2-2")
    activity.set_details("Loadout: grenade + rail gun")

    var assets = activity.get_assets()
    assets.set_large_image("zone2")
    assets.set_large_text("ZONE 2 WOOO")
    assets.set_small_image("capsule_main")
    assets.set_small_text("ZONE 2 WOOO")

    var result = yield(Discord.activity_manager.update_activity(activity), "result").result
    if result != Discord.Result.Ok:
        push_error(result)

Create lobby

func create_lobby():
    var transaction := Discord.lobby_manager.get_lobby_create_transaction()

    transaction.set_capacity(2)
    transaction.set_type(Discord.LobbyType.Private)
    transaction.set_locked(false)

    var result = yield(Discord.lobby_manager.create_lobby(transaction), "result")
    if result.result != Discord.Result.Ok:
        push_error(result.result)
        return

    var lobby = result.data	
    Discord.lobby_manager.send_lobby_message(lobby.get_id(), "hello people!")

Use the Discord Game SDK from GDSscript. Supports Windows, Linux & MacOS (x86_x64 only).

Features:
- Set Rich Presence
- Start Game Lobbies using Discord Networking
- Invite friends to Lobbies through Discord.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Discord Game SDK icon image
samsface
Discord Game SDK

Use the Discord Game SDK from GDSscript. Supports Windows, Linux & MacOS (x86_x64 only).Features:- Set Rich Presence- Start Game Lobbies using Discord Networking- Invite friends to Lobbies through Discord.

Supported Engine Version
3.4
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers