setDiscordRichPresenceStartTime | Multi Theft Auto: Wiki Skip to content

setDiscordRichPresenceStartTime

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function sets the elapsed time of Discord Rich Presence.

Important

To use this function, you must set up your own application setDiscordApplicationID

OOP Syntax Help! I don't understand this!

Syntax

bool setDiscordRichPresenceStartTime ( int seconds )
Required Arguments
  • seconds: an integer representing the number of seconds that has elapsed. If 0, the timer will not be displayed.

Returns

  • bool: value

Returns true if function succeeds, false otherwise.

Code Examples

shared

This example shows how to change the elapsed timer of the Discord Rich Presence application.

local app_id = "YOUR_APPLICATION_ID"
if setDiscordApplicationID(app_id) then
setDiscordRichPresenceState("In-game")
setDiscordRichPresenceStartTime(1)
end