Skip to main content

Games & APIs

Description

User Guide

Plug your games' APIs into your server: your members link their accounts, check their statistics, follow the game servers' status and compare themselves on a leaderboard. 23 games ship ready to use, and you can add more yourself.

What it does​

  • Lets each member link their game account to the server.
  • Displays player statistics on demand.
  • Posts the server status of a game in a message that stays up to date, and can rename a voice counter channel.
  • Automatically broadcasts a game's news into a channel.
  • Builds a leaderboard of the members who have linked their accounts.
  • Offers a search through the databases of certain games.
  • A builder lets you plug in any API that returns JSON, without writing code.

Quick start (Admin)​

  1. Open the dashboard, Games & APIs module, Catalogue tab.
  2. Find your game and click Enable. The game's settings open right away.
  3. If the game is marked "Key required", paste your API key into the API key card. When "TennoCore key" is displayed, a key is already provided and you have nothing to do.
  4. Optionally enable the automations: News, Status, Leaderboard — each one needs a channel and an interval.
  5. Use the Test button to check that the API responds, then Save.
  6. Tell your members about /game list: it shows them the available games, and they link their accounts with /game link.

Commands​

Every command is available to all members, and replies privately when it involves linking an account.

CommandDescription
/game listLists the games enabled on the server, with what each one can do.
/game linkOpens a form to link your account to the chosen game.
/game unlinkRemoves your account link for that game.
/game statsDisplays a member's statistics (yourself by default).
/game statusDisplays the game's server status.
/game lookupSearches for an entry in the game's database.
/game leaderboardRanks the server members who have linked their accounts.

Games shipped with the bot​

23 connectors are provided. Each one exposes one or more capabilities: Player stats, Server status, News, Search.

GameCapabilitiesAPI key
Apex LegendsPlayer statsRequired
Brawl StarsPlayer statsRequired
Chess.comPlayer statsNo
Clash RoyalePlayer statsRequired
Destiny 2Player statsRequired
Epic Games – Free gamesNewsNo
FortnitePlayer statsRequired
Free-To-Game – F2P releasesNews, SearchNo
Genshin ImpactPlayer statsNo
Hypixel (Minecraft)Player statsRequired
League of LegendsPlayer stats, Server statusRequired
LichessPlayer statsNo
Minecraft – PlayerPlayer statsNo
Minecraft – ServerServer statusNo
osu!Player statsRequired
Pokédex (PokéAPI)SearchNo
RAWG – Game databaseSearch, NewsRequired
RobloxPlayer statsNo
Status (generic Statuspage)Server statusNo
Steam – Game newsNewsNo
Steam – ProfilePlayer statsRequired
ValorantPlayer statsRequired
Warframe – WorldServer status, NewsNo

Settings from the dashboard​

The module is made up of five tabs.

  • Catalogue — every available game, filterable by category or by name. Each card shows the game's capabilities and whether it needs a key. Enable and Duplicate buttons (to start from an existing connector) and a link to the API documentation.
  • My games — the games enabled on this server: state, active automations, number of linked accounts, origin of the key, last error encountered. The Configure button opens the settings:
    • General: game active or paused, and the role granted automatically to a member who links their account.
    • API key: your key, stored encrypted and never shown again. Leave the field empty to change nothing.
    • Connector parameters: the settings specific to the game (Steam application ID, region…).
    • News: channel, interval (5 to 1440 minutes, 30 by default) and an optional role mention.
    • Status: channel for the panel, interval (10 minutes by default), and voice counter channel with the name template to use.
    • Leaderboard: channel, interval (60 minutes by default) and a reminder of the reference statistic.
    • Each automation has a Publish now button.
  • Builder — creation of a homemade connector: general information, authentication, fields asked of the member, call steps, and a description of the message to produce. A test bench makes a real call and displays the response tree: click a value to copy its path and reuse it in the display.
  • Players — every linked account on the server, with the option to unlink a member.
  • Log — the last 50 outgoing API calls, with duration, result and error details.

Good to know​

  • A game has to be enabled to exist. Command autocompletion only offers enabled games, and only those compatible with the command being used: a game that only provides news will not show up in /game stats.
  • The link is verified immediately. /game link makes a real API call: if the account is not found, nothing is saved and the member gets the error returned by the game. A linked account is therefore always a working account.
  • The link form is limited to 5 fields, a limit imposed by Discord.
  • Hybrid API key mode: your key always takes priority; failing that, the global TennoCore key is used when one exists. Providing your own gives you your own quota. A saved key is never shown again in the interface.
  • Quotas: each connector defines its own call limit (30 per minute per server in general). Beyond that, the bot replies that you have to wait a minute. Responses are cached for a few minutes, which absorbs repeated requests.
  • Leaderboard: at most 40 linked accounts are queried and the top 20 displayed. Calls are deliberately spaced out so as not to exhaust the server's quota — plan a generous interval if many members are linked. The leaderboard stays empty if the connector defines no reference statistic.
  • First run of a news feed: nothing is published, the bot only records the existing history. This is deliberate, so as not to flood the channel. Publishing starts on the next run.
  • Voice counter channel: Discord only allows 2 renames per 10-minute window. Too short an interval will be silently ignored by Discord.
  • /game list shows at most 25 games, and autocompletion 25 suggestions.
  • Removing a game erases its settings and its news history, but keeps the members' linked accounts.
  • The module's messages use Discord's new display format: each field takes its own line, there is no column layout.
  • Homemade connectors: the addresses called must point to a public API. Any internal or private address is refused, for security reasons.
  • The call log is kept for 7 days.
  • The module sits in the "Under development" category of the dashboard: its interface may still change.