Skip to main content

Overview

ReAdmin ships with a set of built-in Remote Admin commands (ban, kick, warn, promote, demote, rank, suspend, terminate, and find). On top of these, you can write your own commands in Luau and hand them to the ReAdmin loader. When the game starts, ReAdmin:
  1. Loads every command module you provide.
  2. Registers each command (its id, name, and parameters) with the ReAdmin API.
  3. Surfaces those commands in your Remote Admin settings so you can grant or deny them per role, department, or individual user.
  4. Listens for command usage in chat and from the dashboard, resolves the parameters, checks permissions, and calls your executor function.
This means a custom command you write once is permission-gated, audited, and usable from both in-game chat and the ReAdmin web dashboard — no extra wiring required.
Custom commands run on the server. Treat them like any other server-side admin code: only logic you trust should ship inside a command module.

How commands are loaded

The loader accepts an optional commands field. It must be a Folder whose children are ModuleScripts — one module per command.
Internally ReAdmin calls commands:GetChildren() and requires each child. Any child that is not a ModuleScript, or that fails to return a valid command table, is skipped with a warning — one bad command will never stop the rest from loading.
You can keep using ReAdmin’s built-in commands and add your own at the same time. The commands in the module’s internal Commands folder are always loaded; the folder you pass in commands is loaded in addition to them.

Anatomy of a command

Every command module returns a single table with four required fields:
The field is spelled paramaters (matching the module’s internal API). Use that exact spelling or your command will fail to load.

Parameter definitions

Each entry in paramaters is a table:

Parameter types

fallbackFind lets you action players who are not currently in the server (handy for ban). The returned pseudo-player only contains UserId and Name. If you need more than that, reach out in our Discord.

The executor function

executor receives a single args table:
A few important guarantees ReAdmin makes before your executor runs:
  • Permissions are already checked. The executor is only called if the actioner has been granted this command’s id in Remote Admin settings.
  • Required parameters are already validated. Any non-optional parameter is guaranteed to be present, so you can dereference args.paramaters.player.UserId without nil-checking it.

The apiWrapper

The apiWrapper is an authenticated ReAdmin API client. It exposes the same actions ReAdmin’s built-in commands use, so your custom commands can create real records that show up across the dashboard. Common methods include: Every method returns a response with a StatusCode and Body. Check the status before notifying the user.
To send feedback to the player who ran the command, fire the ReAdminEvent RemoteEvent with a notify payload (this is how the built-in commands report success and failure):

Full example

Create a ModuleScript (for example MyCommands/Compliment) that returns a command. This command takes a player and an optional message, and logs a positive staff history note:
Then register the folder with the loader:
A staff member can now type /compliment builderman Great session today! in chat — but only if they have been granted the mygroup_compliment permission in Remote Admin settings.

Best practices

  • Use a unique, namespaced id (e.g. mygroup_<action>) to avoid clashing with ReAdmin’s built-ins or another command.
  • Validate the result of every apiWrapper call before telling the user it succeeded.
  • Keep executors fast and defensive. ReAdmin wraps command parsing in a pcall, but a hung executor still ties up the request.
  • Grant before you test. A newly added command is denied to everyone by default — enable it for yourself in Remote Admin settings first.