- Documentation
- Client functions
- setDiscordRichPresenceAsset
Function
setDiscordRichPresenceAsset
Sets the large image in the player's Discord status and the caption shown when hovering over it. The image is the key (name) of artwork uploaded in the Discord Developer Portal to the application set with setDiscordApplicationID. Without your own application Trilogy Hub shows its logo. An empty key removes the script-set image.
Syntax
bool setDiscordRichPresenceAsset(string asset [, string text = ""])Arguments
assetstring- Image key from Art Assets (up to 256 characters).
""= remove. textstring, optional = ""- Hover caption (up to 128 characters).
Returns
true when the status was passed to the launcher.
Example
setDiscordRichPresenceAsset("mapa_ls", "Los Santos")
See also
setDiscordRichPresenceSmallAssetSets the small round image in the corner of the large Discord status image, e.g. a faction or rank icon, with a hover caption. The image must be in the Art Assets of the application set withsetDiscordApplicationID. An empty key removes it.setDiscordApplicationIDSwitches the player's Discord status to your server's own Discord application (the Application ID from the Discord Developer Portal). The status then shows your server's name instead of "Trilogy Hub", and you can use your own images from that application's Rich Presence → Art Assets tab. Changing the application requires reconnecting to Discord, so previously set images are cleared. An empty string goes back to the Trilogy Hub application.