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

Function

setDiscordRichPresenceButton

ClientDiscordTrilogy Hub only

Adds a link button under the player's Discord status, e.g. "Join our Discord" or "Server website". There can be two buttons (number 1 and 2). Discord shows the buttons to other people viewing the player's profile, not to the player themselves. An empty label removes the button.

Syntax

bool setDiscordRichPresenceButton(int index, string label, string url)

Arguments

indexint
Button number: 1 or 2.
labelstring
Button label (up to 32 characters). "" = remove the button.
urlstring
An address starting with http:// or https://.

Returns

true on success, false for a bad number or address.

Example

setDiscordRichPresenceButton(1, "Discord serwera", "https://discord.gg/przyklad")
setDiscordRichPresenceButton(2, "Strona", "https://example.com")

See also