setDiscordRichPresenceSmallAsset | Multi Theft Auto: Wiki Skip to content

setDiscordRichPresenceSmallAsset

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 small image asset of the application. The maximum size of assets is 1024x1024, the minimum 512x512.

Important

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

OOP Syntax Help! I don't understand this!

Syntax

bool setDiscordRichPresenceSmallAsset ( string assetImage, string text )
Required Arguments
  • assetImage: a string containing the key of the small image asset you uploaded to your application's asset list.
  • text: a string containing the hover text of the small image asset.

Returns

  • bool: value

Returns true if function succeeds, false otherwise.

Code Examples

shared

The example sets the small image asset to my_logo.

addCommandHandler("setsmalllogo",
function ()
if isDiscordRichPresenceConnected() then
setDiscordRichPresenceSmallAsset("my_small_logo", "This is my small logo!")
end
end
)