DOCUMENTATION
What each part does, how to set it up, and what your members see.
Connect anything that has code to your Discord: a FiveM, RedM or Minecraft server, an app, a website, a bot. It reports in; Lunar shows its status, says when it goes down, and answers the questions a whitelist or a login check asks.
403 that says so and the status message stops changing; settings and keys are kept.lunar_srv_.... Keep it like a password.resources/ and add set lunar_key "..." and ensure lunar-status to server.cfg. Anything else: send the heartbeat below about once a minute./status.Base address https://api.thelunarbot.com/v1. Every request carries the service's key as Authorization: Bearer lunar_srv_.... A key belongs to one service in one Discord, so there's no server id to pass and nothing else it can reach. Fields are only ever added to these shapes, never renamed.
POST /heartbeatReport in. JSON body, all optional: players, maxPlayers, playerNames (up to 100), address, version, map, motd, and status, which is "online" unless you send "stopping" on shutdown. A service that says nothing for three minutes (you choose how long) reads as offline. For something that isn't a game, players is shown as how many are online and map as a line of detail. Every text field is cut to length and made inert before it reaches Discord, so nothing in a report can ping, link or format anything.GET /members/{discordId}Who this Discord account is to your server: inServer, banned, roles (id and name), nickname, level, xp, joinedAt. This is what a role whitelist, a priority queue or "banned in Discord means banned in game" asks at the door.GET /meWhich service and Discord this key belongs to. Useful for checking a key.server.cfg or an environment variable and nowhere else, never in a chat, a screenshot, a public repository or anything users download. Service keys don't expire, so an old key never takes your service offline without warning; replace one every few months from the dashboard, and at once if it may have leaked.429 with a Retry-After.With the script installed, set lunar_whitelist_role "Whitelisted" lets in only members holding that role, and set lunar_block_banned "true" turns away anyone banned in your Discord. The role can be a name or an id. Players need Discord open when they start FiveM so the server can see their account.