Discord moderation and automation bot with a built-in FiveM server monitor. Every command is a slash command, and every message is a Components V2 card.
- Moderation: warn, timeout, kick, ban (timed), softban, lock, slowmode, purge. Every action is a numbered case in the mod log, with DMs,
/history, staff notes and role hierarchy checks. - Protection: anti-raid (verification level, lockdown, kicks, one-button undo), anti-nuke (strips roles from accounts that delete too fast), anti-spam, age-gate quarantine, Discord AutoMod setup.
- Recovery:
/undoreverses any staff action from the last 7 days. Daily role and channel snapshots feed/restore, and daily database backups are kept. - Community: tickets (private threads, transcripts, ratings), reports, ban appeals, suggestions, role menus, welcome messages, giveaways, temporary voice channels, reminders, tags, auto-replies, sticky and scheduled messages.
- FiveM monitor: grouped join/leave logs, online/offline notices, player count in status, 24 h chart, playtime ranking, watchlist.
- Operations: setup wizard, per-server settings, event logs, staff activity stats, 30-day data retention after the bot leaves a server.
Node.js 22.13+ (uses the built-in node:sqlite, nothing to compile).
- Create a Discord application and enable Server Members Intent. Message Content Intent is optional; it is needed for message text in logs, anti-spam and auto-replies.
- Invite the bot with the
botandapplications.commandsscopes and Administrator. Place its role above every role it should manage. - Install and configure:
git clone https://github.com/kaan0d/rejs.git && cd rejs npm install cp .env.example .env
DISCORD_TOKEN= DEV_RESTART=false # true: pull and restart on new commits DEV_GUILD_ID= # optional: register owner commands only here ERROR_CHANNEL_ID= # optional: error reports, otherwise DM to owner
- Run
npm start. Slash commands register on startup. - Run
/setupin Discord. For the FiveM monitor:/config monitor address:1.2.3.4:30120 channel:#server-log(polls/players.jsonand/dynamic.jsonevery 10 s).
/help lists the commands each member can use. Staff commands are hidden from members without the required permission. Per-command visibility can be changed under Server Settings → Integrations.
pm2 start ecosystem.config.js && pm2 save && pm2 startupWith DEV_RESTART=true, the bot checks GitHub every minute, pulls new commits, reinstalls dependencies if package.json changed, and restarts. Owner-only commands: /restart, /update, /stats, /blacklist, /announce, /backup. Errors are reported at most once per 10 minutes.
npm testMIT, see LICENSE.