- Documentation
- Client functions
- setDiscordRichPresenceState
Function
setDiscordRichPresenceState
Sets the bottom line of the player's Discord status, usually what they are doing right now (e.g. "Patrolling Idlewood", "On the map: 12/32 players"). It works like setDiscordRichPresenceDetails: through the launcher, with at most one change every 15 seconds. An empty string restores the default "As nickname".
Syntax
bool setDiscordRichPresenceState(string text)Arguments
textstring- Text up to 128 characters.
""/nil= default text.
Returns
true when the status was passed to the launcher.
Example
setTimer(function()
local vehicle = getPedOccupiedVehicle(localPlayer)
setDiscordRichPresenceState(vehicle and ("Jedzie: " .. getVehicleName(vehicle)) or "Pieszo")
end, 15000, 0)