ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setDiscordApplicationID

Function

setDiscordApplicationID

ClientDiscordTrilogy Hub only

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