SetDiscordApplicationId: 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: | ||
= setDiscordApplicationId = | = setDiscordApplicationId = | ||
'''Available from 0.1.9 | '''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. | '''Server-side only.''' Part of [[Discord Rich Presence]]. See [[Discord Presence configuration]] for the optional server-owner resource. | ||
Latest revision as of 13:29, 20 October 2026
setDiscordApplicationId
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 ok, reason = setDiscordApplicationId("YOUR_PUBLIC_APPLICATION_ID")
Parameters and behavior
One public Discord Application ID as a decimal string, 17..20 digits, nonzero with no leading zero and within unsigned 64-bit range. Do not use a Lua number, guild/user ID, Client Secret or bot token. This setting belongs to the calling resource. It affects subsequent set/update calls; already queued profiles retain their previous ID until updated.
Returns
Boolean success plus an empty string, or false plus application-id-must-be-a-decimal-string. Rejection preserves the previous configured ID.
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.