setDiscordRichPresenceEndTime | Multi Theft Auto: Wiki Skip to content

setDiscordRichPresenceEndTime

Client-side
Server-side
Shared

Added in 1.6.0 r22276

This function sets the remaining 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 setDiscordRichPresenceEndTime ( int seconds )
Required Arguments
  • seconds: An integer representing the number of seconds that are remaining. If 0, or lower than the start time ( setDiscordRichPresenceStartTime ) the timer will not be displayed.

Returns

  • bool: result

Returns true if function succeeds, false otherwise.

Code Examples

client

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

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