- Documentation
- Client functions
- setDiscordRichPresenceStartTime
Function
setDiscordRichPresenceStartTime
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
setDiscordRichPresenceEndTimeSets the "remaining" timer in the Discord status: Discord counts down to the given moment (e.g. the end of a round). Pass a Unix timestamp in seconds. 0 turns the countdown off.getRealTimeReturns the real date and time of the server (or the player's computer) as a table:second,minute,hour,monthday,month(0-11),year(years since 1900),weekday(0 = Sunday),yearday,isdstandtimestamp. With an argument it breaks down the given timestamp.