ResetDiscordRichPresenceData: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
The function resets all the data we have previously transmitted and sets to default.
{{New feature/item|3.0162|1.6.0|22269|
The function resets the Discord Rich Presence configuration to default.
}}


==Syntax==  
==Syntax==  
Line 9: Line 11:


===Returns===
===Returns===
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.
Returns ''true'' if function succeeds, ''false'' otherwise.


==Example==
==Example==
The example shows if you set up your own application and sample asset and then reset the data.
The example shows how to reset Discord Rich Presence after using a custom application.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
setDiscordApplicationID("you_application_key")
setDiscordApplicationID("you_application_key")

Revision as of 00:56, 11 October 2023

ADDED/UPDATED IN VERSION 1.6.0 r22269:

The function resets the Discord Rich Presence configuration to default.

Syntax

bool resetDiscordRichPresenceData()

Returns

Returns true if function succeeds, false otherwise.

Example

The example shows how to reset Discord Rich Presence after using a custom application.

setDiscordApplicationID("you_application_key")
setDiscordRichPresenceAsset("asset_logo", "Name of Asset")
if resetDiscordRichPresenceData()  then -- we reset to default by MTA Application.
    outputChatBox("Discord Rich Presence has been cleared and restored to default settings.")
end

See Also

ADDED/UPDATED IN VERSION 1.6.0 r22342: