setDiscordRichPresenceAsset | Multi Theft Auto: Wiki Skip to content

setDiscordRichPresenceAsset

Client-side
Server-side
Shared

Added in 1.6.0 r22270

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. Max 128 characters.

Returns

  • bool: result

Returns true if function succeeds, false otherwise.

Code Examples

client

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)