OnPlayerDiscordPresenceStatus: Difference between revisions
Document upcoming 0.1.9 Discord Rich Presence: server Lua functions, callback, opt-in and owner setup; not a release |
Release 0.1.9 / BUILD264 / Protocol42: availability and download setup; preserve experimental limits |
||
| Line 1: | Line 1: | ||
= onPlayerDiscordPresenceStatus = | = onPlayerDiscordPresenceStatus = | ||
'''Available from 0.1.9 | '''Available from 0.1.9. Use matching updated clients and server.''' | ||
Server-side diagnostic event, delivered to the resource currently owning a player's active [[Discord Rich Presence]] profile. No addEvent declaration is needed. | Server-side diagnostic event, delivered to the resource currently owning a player's active [[Discord Rich Presence]] profile. No addEvent declaration is needed. | ||
Latest revision as of 13:28, 20 October 2026
onPlayerDiscordPresenceStatus
Available from 0.1.9. Use matching updated clients and server.
Server-side diagnostic event, delivered to the resource currently owning a player's active Discord Rich Presence profile. No addEvent declaration is needed.
Signature
addEventHandler("onPlayerDiscordPresenceStatus", root, function(playerId, status)
outputDebugString("Discord player " .. tostring(playerId) .. ": " .. status)
end)
playerId is the numeric game player ID; status is a string. Delivery occurs on diagnostic changes to the current owner, deferred by the server, not synchronously inside set/update.
See all status values. After clear there is no owner and no former-owner cleanup callback. Not every possible status is guaranteed to be emitted. The getter also returns disconnected for invalid/offline players; use onPlayerQuit for quit handling.
Advisory client diagnostics, never authorization. Applied means local Discord RPC acknowledgement, not proof of identity, guild membership, roles, public display or valid gameplay. Do not grant rewards/permissions based on it. No Discord account ID, token, username or friends list is passed. getPlayerDiscordPresenceStatus can read the last status; it may lag a clear until the next client report.