GetDiscordTimestamp
getDiscordTimestamp
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 timestamp = getDiscordTimestamp()
Parameters and behavior
No arguments. Current UTC Unix timestamp in seconds, suitable for presence startTimestamp/endTimestamp. It is not getTickCount's monotonic milliseconds.
Returns
Numeric integer seconds. Calling this does not publish a profile or start a Discord connection.
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.