FiveM integration

Connect any number of FiveM servers to one Discord server.

Status polling (no resource needed)

Enter the server's public IP or domain with its port, for example 203.0.113.5:30120. Private addresses such as localhost or 192.168… only work on a self-hosted bot. Casharks Bot reads FiveM's public /info.json and /players.json every minute, keeps a live status embed updated, and announces when the server goes offline/online.

The Casharks Bot resource (events)

  1. In the dashboard: Integrations → Games → FiveM → Save. Copy the key shown (starts with cfm_). It's shown once and stored only as a hash.
  2. Download the resource, unzip it and put the casharks folder in your server's resources.
  3. Add this to server.cfg with your key, then restart the server. Its console shows [casharks] Connected to …:
cfg
set casharks_api_url "https://casharksbot.online"  # or your own address if you self-host
set casharks_key "cfm_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ensure casharks

The key lives in a server convar — never in client scripts — so players can't read it.

Events sent

player_join, player_leave, server_start, server_stop, heartbeat (every 60s, with player counts) and custom.

Custom events from your own scripts

lua
-- server-side only
exports.casharks:SendEvent("robbery_started", "A bank robbery started downtown!", { location = "Pacific Standard" })

Custom events can trigger automations (FiveM event trigger) and post to your event channel.