setDiscordRichPresenceAsset | Multi Theft Auto: Wiki Skip to content

setDiscordRichPresenceAsset

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.


Using this function you can set the large image asset of the application. The maximum size of assets is 1024x1024, the minimum is 512x512.

Important

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

OOP Syntax Help! I don't understand this!

Syntax

bool setDiscordRichPresenceAsset ( string assetImage, string text )
Required Arguments
  • assetImage: a string containing the key of the image you uploaded to your application's asset list.
  • text: a string to be displayed when someone hovers over the large image asset in Discord.

Returns

  • bool: value

Returns true if function succeeds, false otherwise.

Code Examples

shared

The example sets the large image asset to my_logo.

addCommandHandler("setlogo",
function ()
if isDiscordRichPresenceConnected() then
setDiscordRichPresenceAsset("my_logo", "This is my logo!")
end
end
)