setDiscordApplicationID | Multi Theft Auto: Wiki Skip to content

setDiscordApplicationID

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.


The function can assign your own application to use in Rich Presence. You can create an application here

Important

To reset the application ID, please use resetDiscordRichPresenceData

Important

In order for the function to work correctly, the user must have their activity privacy/status enabled in Discord.

OOP Syntax Help! I don't understand this!

Syntax

bool setDiscordApplicationID ( string applicationID )
Required Arguments
  • applicationID: a string representing your Discord application's ID.

Returns

  • bool: value

Returns true if function succeeds, false if the client has disabled rich presence.

Code Examples

shared

This example outputs whether the application was successfully setup and sets a custom asset image.

local app_id = "YOUR_APPLICATION_ID"
if setDiscordApplicationID(app_id) then
setDiscordRichPresenceAsset("asset_name_from_application")
outputChatBox("Yay, we're now using our own application!")
end