SetDiscordApplicationId
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.