faceit-elo-bot

FACEIT CS2 elo / peak elo as JSON endpoints for Twitch chat bots.

All routes respond with JSON. Every route accepts a FACEIT nickname or a player_id (the stable UUID that never changes).

GET /elo

Current elo/level + rolling-window stats.

querynickname or player_id (single token); falls back to default. Inline window supported: nick:24, :24, nick:
defaultfallback player for argument-less calls
hwindow in hours, 1–720 (default 12); an inline nick:h wins
gameFACEIT game id (default cs2)

Example: /elo?query=redinside · /elo?query=redinside:24

GET /maxelo

All-time highest elo (via Faceit Analyser).

querynickname or player_id (single token); falls back to default
defaultfallback player for argument-less calls
gamegame id (default cs2): cs2, csgo, dota2, ow2, deadlock

Example: /maxelo?query=redinside

GET /playerid

Resolve a nickname to its stable FACEIT player_id.

querynickname (single token); falls back to default
defaultfallback player for argument-less calls

Example: /playerid?query=redinside

Nightbot — ready-to-use commands

Paste into chat, then replace YOUR_NICK with your FACEIT nickname. Bare !elo shows your stats; !elo someone looks up another player.

Tip: drop your player_id in place of the nickname so the command survives a rename — grab it from /playerid.

!addcom !elo $(eval const a = $(urlfetch json https://faceit.redins1de.xyz/elo?query=$(querystring)&default=YOUR_NICK&h=12); a.error ? a.error : a.nickname + ' • ELO: ' + a.elo + ' • LVL: ' + a.level + ' • ' + a.window.hours + 'h: ' + a.window.eloStr + ' [' + a.window.win + 'W/' + a.window.lose + 'L]')
!addcom !maxelo $(eval const a = $(urlfetch json https://faceit.redins1de.xyz/maxelo?query=$(querystring)&default=YOUR_NICK); a.error ? a.error : a.nickname + ' • Peak ELO: ' + a.maxelo)

Caching

Successful responses are cached at the edge to spare the upstream APIs: /elo 30s · /maxelo 1h · /playerid 10m. Errors are never cached. The X-Cache response header shows HIT or MISS.