setDiscordRichPresenceState | Multi Theft Auto: Wiki Skip to content

setDiscordRichPresenceState

Client-side
Server-side
Shared

Added in 1.6.0 r22270

This function sets the status of the Discord Rich Presence application.

Important

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

OOP Syntax Help! I don't understand this!

Syntax

bool setDiscordRichPresenceState ( string state )
Required Arguments
  • state: A string containing the status text. Max 128 characters.

Returns

  • bool: result

Returns true if function succeeds, false otherwise.

Code Examples

client

This example shows how to set the state of the Discord Rich Presence application.

local app_id = "YOUR_APPLICATION_ID"
if setDiscordApplicationID(app_id) then
setDiscordRichPresenceState("waiting in lobby")
end