# Social Source: https://tehoclient.dev/modules/social SDK: 1.0.0 Social connects your server to Teho's friends graph and the player's Discord: rich presence, invites, seamless transfers between servers, and links in the pause menu. ## Rich presence ```java teho.social().presence(Presence.builder("Skyline") .map("Lighthouse") .state("Bedwars Duos ยท Round 2") .startedNow() .party(2, 4) .joinable(true) .build()); teho.social().clearPresence(); ``` Shown in Discord and in the Teho friends list. With `joinable(true)`, friends can join from there. | Method | Notes | |---|---| | `builder(game)` | The game or server name. | | `map(String)`, `state(String)` | Detail lines. | | `startedAt(epochMs)` / `startedNow()` | Shows elapsed time. | | `party(size, max)` | Party size. | | `joinable(boolean)` | Lets friends join. | ## Invites ```java teho.social().openInvites("Fill your party", "party-81f2", "play.skyline.gg"); ``` Opens Teho's invite sheet so the player can invite friends to your server without typing an address. ## Seamless transfer ```java teho.social().transfer("eu.skyline.gg", 25565, ticket, "Skyline EU", "Moving you to the EU lobby"); ``` Moves the player to another server through Teho's handoff loading screen instead of a disconnect. `token` is passed to the destination so it can recognise the arrival; after the handshake with the destination, the client reports it as a `transfer.token` client event (kind `transfer.token`, value the token). Tokens older than 60 seconds are dropped. ## Pause-menu links ```java Map links = new LinkedHashMap<>(); links.put("Discord", "https://discord.gg/skyline"); links.put("Store", "https://store.skyline.gg"); links.put("Rules", "https://skyline.gg/rules"); teho.social().links(links); ``` Up to three buttons in the pause menu. They always open behind vanilla's link confirmation screen. ## No code ```yaml presence: game: "Skyline" state: "In the lobby" links: Discord: "https://discord.gg/skyline" Store: "https://store.skyline.gg" ``` ```text /tehoapi presence * Skyline | In the lobby /tehoapi transfer Notch eu.skyline.gg:25565 ```