- Documentation
- Client functions
- setDiscordApplicationID
Function
setDiscordApplicationID
Switches 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.
Syntax
bool setDiscordApplicationID(string id)Arguments
idstring- Application number (digits only, as a string, e.g.
"1234567890123456789").""= the Trilogy Hub application.
Returns
true on success, false when the string is not a number.
Example
setDiscordApplicationID("1234567890123456789")
setDiscordRichPresenceAsset("logo", "Mój Serwer RP")
Notes
Number as a string. The application number is too large for a Lua number without losing precision, so always pass it in quotes.
See also
setDiscordRichPresenceAssetSets 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 withsetDiscordApplicationID. Without your own application Trilogy Hub shows its logo. An empty key removes the script-set image.resetDiscordRichPresenceDataClears everything scripts have set in the player's Discord status (texts, images, times, party, buttons, own application) and restores the default Trilogy Hub status: "Playing on: server name / As nickname". The status is also cleared automatically when the player connects, disconnects or leaves.