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:
- Loads every command module you provide.
- Registers each command (its
id,name, and parameters) with the ReAdmin API. - Surfaces those commands in your Remote Admin settings so you can grant or deny them per role, department, or individual user.
- Listens for command usage in chat and from the dashboard, resolves the
parameters, checks permissions, and calls your
executorfunction.
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 optionalcommands field. It must be a Folder whose
children are ModuleScripts — one module per command.
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.
Anatomy of a command
Every command module returns a single table with four required fields:Parameter definitions
Each entry inparamaters 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:
- Permissions are already checked. The executor is only called if the
actionerhas been granted this command’sidin Remote Admin settings. - Required parameters are already validated. Any non-
optionalparameter is guaranteed to be present, so you can dereferenceargs.paramaters.player.UserIdwithout 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.
Full example
Create aModuleScript (for example MyCommands/Compliment) that returns a
command. This command takes a player and an optional message, and logs a
positive staff history note:
/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
apiWrappercall 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.