GetPlayerDiscordPresenceStatus

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

getPlayerDiscordPresenceStatus

Available from 0.1.9. Use matching updated clients and server.

Server-side only. Part of Discord Rich Presence. See Discord Presence configuration for the optional server-owner resource.

Syntax

local status = getPlayerDiscordPresenceStatus(playerId)

Parameters and behavior

Numeric game player ID. Last client diagnostic status for this player's presence. See all statuses and caveats. A changed profile resets an old applied state; clearing may leave a previous report until the next client poll.

Returns

String: unsupported, disabled, idle, connecting, unavailable, applied, error, cleared, or disconnected. Disconnected covers invalid/offline players. Applied is a local RPC acknowledgement, NOT proof of a Discord account, permissions, public visibility or legitimate gameplay.

Examples, lifecycle and safety

See Discord Rich Presence for complete initialization, location/job updates, field removal, timestamps, counts, buttons and callback examples. Player launcher opt-in is off by default and cannot be overridden. No bot or token is needed; no Discord account identity is returned. Do not forward arbitrary client input to this server API.