This class provides static methods to interact with the Discord RPC (Rich Presence) API. It facilitates integration with Discord's rich presence functionality, enabling applications to display real-time information about the user's status. Methods are available for initializing the API, updating presence, handling callbacks, and managing connection settings.
Static variables
Static methods
staticInitialize(applicationId:ConstCharStar, handlers:RawPointer<DiscordEventHandlers>, autoRegister:Bool, optionalSteamId:ConstCharStar):Void
Initializes the Discord RPC.
Parameters:
applicationId | The application ID for the Discord app. |
---|---|
handlers | Pointer to a DiscordEventHandlers struct containing event callbacks. |
autoRegister | Indicates whether to automatically register the application to Steam. |
optionalSteamId | Optional Steam ID if using Steam. |
staticRegister(applicationId:ConstCharStar, command:ConstCharStar):Void
Registers the application.
Parameters:
applicationId | The application ID for the Discord app. |
---|---|
command | The command to register. |
staticRegisterSteamGame(applicationId:ConstCharStar, steamId:ConstCharStar):Void
Registers a Steam game.
Parameters:
applicationId | The application ID for the Discord app. |
---|---|
steamId | The Steam ID for the game. |
staticRespond(userid:ConstCharStar, reply:DiscordActivityJoinRequestReply):Void
Responds to a user's request.
Parameters:
userid | The user ID to respond to. |
---|---|
reply | The reply type. |
staticUpdateHandlers(handlers:RawPointer<DiscordEventHandlers>):Void
Updates the event handlers.
Parameters:
handlers | Pointer to a DiscordEventHandlers struct containing event callbacks. |
---|
staticUpdatePresence(presence:RawConstPointer<DiscordRichPresence>):Void
Updates the current presence.
Parameters:
presence | Pointer to a DiscordRichPresence struct containing the presence information. |
---|