Skip to content
YYBartT edited this page Jul 15, 2024 · 9 revisions

Core

Functions

Constants


Functions

Back To Top

Discord_Core_Create

This function initialises the Discord extension and returns whether this was successful.

The creationFlag parameter determines if the Discord extension requires or doesn't require Discord to be running. If creationFlag is set to Discord_CreateFlags_Default and Discord is not running, it will:

  1. Close your game
  2. Open Discord
  3. Attempt to re-open your game

Syntax

Discord_Core_Create(appId, creationFlag)
Argument Type Description
appId int64 Application identifier
creationFlag Discord_CreateFlags Discord_CreateFlags_Default or Discord_CreateFlags_NoRequireDiscord

Returns

bool

Example

if(!Discord_Core_Create(_applicationId, Discord_CreateFlags_Default))
{
    show_message_async("Discord Initialization Error");
    exit;
}



Back To Top

Discord_Core_RunCallbacks

Requests the extension instances to do work.

⚠️ IMPORTANT It is imperative that this function is called at regular intervals to ensure that all the services offered by the SDK function optimally.

Syntax

Discord_Core_RunCallbacks()

Returns

N/A

Example

/// Step Event
Discord_Core_RunCallbacks();


Constants

Back To Top

Discord_OK

Constant Value Description
Discord_OK 0 A constant that indicates that the result is OK.

Discord_CreateFlags

Discord Enum: CreateFlags Enum

Constant Value Description
Discord_CreateFlags_Default 0 Requires Discord to be running to play the game
Discord_CreateFlags_NoRequireDiscord 1 Does not require Discord to be running, use this on other platforms


Clone this wiki locally