Widgets
Game servers and widgets
Start here: add a game server, put a live status card on your website, and pin it in Discord.
Two things make a game server look alive: a status card on your website, and a live card in your Discord. Dispresso does both from one listing. You add the server once, and the same listing feeds the site widget, the Discord card, the /servers/games page and the seeding tools.
The whole path in four steps#
- 1Get the server ready. Know the address and, for Steam games, the query port. Each game guide below lists exactly what to look for.
- 2Add it. In Discord run
/gameserver setup, or use /dashboard/servers/games on the site. - 3Prove it is yours by putting a short code in the server name for a few minutes.
- 4Embed it. Paste two lines on your website, and run
/gameserver pinfor a live card in Discord.
Pick your game#
| Game | How Dispresso reads it | The thing to get right |
|---|---|---|
| Minecraft (Java) | Status ping | Public address, port only if not 25565 |
| DayZ | Steam query | The query port, not the game port |
| Rust | Steam query | The query port, UDP open |
| Garry's Mod | Steam query | Port 27015 open as UDP |
| Arma (3 and Reforger) | Steam query | The query port, not the game port |
| Hell Let Loose | Steam query | The query port from your host |
| Squad | Epic Online Services | Nothing to open, just claim it |
| FiveM | Public FiveM list | Server must be on the public list |
| Roblox | Roblox public data | Paste the game link |
Other games
Anything else (ARK, Valheim, Palworld, CS2 and so on) can be listed under Other / custom and goes to staff review, but there is no live query for those yet, so the card shows Unknown and no player count. There are no guides for them until that changes.
The widgets#
| Widget | Shows | Guide |
|---|---|---|
| Game server card | One server, or the top few for a game | Your game's guide above |
| Levels board | Top members by XP in a Discord server | Levels board |
| Bump board | Who bumped the server most | Bump board |
| Server status card | Name, icon and three public counts | Server status card |
- Levels board
- Bump board
- Server status card
- Seeding board: who seeds your Squad, Hell Let Loose or WARDOGS server.
- Put a widget on any website: plain HTML, WordPress, Wix, Squarespace, Carrd and the common mistakes.
Live previews of all four are on /widgets.
How the widgets work#
- Each widget is one small script from
dispresso.co/widgets/that only ever talks toapi.dispresso.co. No key, no login, nothing to install. - They show only what is public: a listed, approved server that is not marked 18+. Anything else shows a short message, never a broken box.
- Two widgets of the same kind on one page need only one script tag.
- They follow the visitor's light or dark theme.
data-theme="dark"or"light"forces one. data-accentsets the color (a hex such as#5865f2, or blue, violet, green, teal, pink, red, amber, orange, slate) anddata-size="compact"gives a tighter card.- A game server card can also show a 24 hour player chart with today's peak (
data-chart="24h") and who is on now (data-players="5", up to 15). Player names show for Rust, Arma, Hell Let Loose and Garry's Mod, whose servers share them with any server browser. - Each widget draws inside its own shadow root: your site's CSS cannot break it and its styles never leak onto your page. It fits anywhere from 280 to 600 pixels wide.
- The
?v=3on the script address makes browsers fetch the newest version. Snippets without it keep working and catch up within a few hours.
<div data-dispresso-game-server data-server="YOUR_LISTING_ID"
data-chart="24h" data-players="5"></div>
<script src="https://dispresso.co/widgets/game-server.js?v=3" async></script>Build your own look#
Want your own design instead of ours? Read the same public address the widget reads and draw it however you like. This one fetches a listing and prints a line of text:
<p id="my-server">Loading...</p>
<script>
fetch("https://api.dispresso.co/api/espresso/game-servers/YOUR_LISTING_ID")
.then(function (res) { return res.ok ? res.json() : null; })
.then(function (data) {
var el = document.getElementById("my-server");
if (!data || !data.server) { el.textContent = "Server not listed right now."; return; }
var s = data.server;
el.textContent =
s.name.trim() + ": " + (s.status === "online" ? "online" : "offline") +
", " + s.players + " / " + s.max_players + " players";
});
</script>Fields available include name, status, players, max_players, map and last_query_at. The rest of the public API is in Developer API and Wire your website to Discord.
Styling#
Four knobs need no CSS: data-theme, data-accent, data-size and, on lists, data-limit (1 to 25). For the rest, give the div an id: its width comes from your page (at most 600 pixels by default), and the corner radius and font follow the --dispresso-radius and --dispresso-font variables:
<style>
/* The card draws in its own shadow root, so size it from outside and
set the look through these variables. Your id beats the built in rules. */
#server-card {
max-width: 420px;
--dispresso-radius: 6px;
--dispresso-font: Georgia, serif;
}
</style>
<div id="server-card" data-dispresso-game-server data-server="YOUR_LISTING_ID"
data-theme="dark" data-accent="#5865f2" data-size="compact"></div>
<script src="https://dispresso.co/widgets/game-server.js?v=3" async></script>