ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setDiscordRichPresenceStartTime

Function

setDiscordRichPresenceStartTime

ClientDiscordTrilogy Hub only

Sets the "elapsed" timer in the Discord status: Discord counts time from the given moment (e.g. the start of a mission or a shift). Pass the time as a Unix timestamp in seconds, e.g. from getRealTime().timestamp. 0 restores the timer counting from when the player joined the game.

Syntax

bool setDiscordRichPresenceStartTime(int seconds)

Arguments

secondsint
Unix timestamp in seconds. 0 = since joining the game.

Returns

true when the status was passed to the launcher.

Example

setDiscordRichPresenceDetails("Misja: konwój")
setDiscordRichPresenceStartTime(getRealTime().timestamp)

See also