Discord bot · Resources
Syntax & permissions
How to read the commands in these docs, the units the bot understands, what each punishment does and which permission each command needs.
The prefix#
Every command works two ways: as a slash command (/mod ban) and as a prefix command (,ban). The prefix is , by default. Mentioning the bot works as a prefix too, so @Spotlight help always answers, even if you forgot the prefix.
Syntax
,prefix ,prefix set <prefix>
Example
,prefix set ! @Spotlight prefix set ,
Prefix commands have no limit on how many exist, so some tools (antiraid, hardban, the reposter, webhooks) are only prefix commands. Grouped slash commands also work with the prefix: ,mod ban is the same as ,ban.
Reading the syntax#
| <argument> | Required. The command won't run without it. |
| [argument] | Optional. Leave it out and the bot uses a sensible default (often you, or this channel). |
| a | b | Pick one of these forms. |
| … | More of the same can follow (several roles, several emojis). |
Don't type the brackets themselves: ,ban <user> [reason] becomes ,ban @specter spamming.
Values the bot understands#
| user | A mention (@specter) or a user ID (123456789012345678). An ID works for people who already left, so you can ban them. |
| role | A mention (@Members), an ID, or the role's name (members; the start of the name is enough when it's unique). |
| channel | A mention (#general) or an ID. Many commands use the current channel when you leave it out. |
| duration | A number and a unit: 30s, 10m, 2h, 1d, 1w. Timeouts and timed mutes go up to 28 days. |
| message link | Right click a message → Copy Message Link (https://discord.com/channels/…). |
| script | Plain text, or an embed script like {embed}$v{title: Hello}. See Embeds & messages for every variable. |
| on | off | Also yes/no, enable/disable, true/false. |
Punishments#
Antiraid, the honeypot, antinuke and AutoMod let you choose what happens to someone. These are the choices:
| kick | Removes them from the server. They can join again with an invite. |
| ban | Bans them. They can't come back until someone unbans them. |
| softban | Bans and unbans straight away: they're removed and their messages from the last day are deleted, but they can join again. The usual choice for spam bots. |
| timeout | Times them out for a day: they can read but not write, react or talk. |
| jail | Takes their roles and keeps them in the jail channel until ,unjail (set it up with ,setup jail). Falls back to a timeout if the jail isn't set up. |
| strip | Antinuke only: removes every role with a dangerous permission (Administrator, Ban Members, Manage Roles…). |
Permissions#
Each command needs one Discord permission. Server owners and Administrators can use everything. The name in the right corner of each command in these docs is the permission it needs.
| administrator | Administrator |
| manage_guild | Manage Server |
| manage_roles | Manage Roles |
| manage_channels | Manage Channels |
| manage_messages | Manage Messages |
| manage_webhooks | Manage Webhooks |
| ban_members | Ban Members |
| kick_members | Kick Members |
| moderate_members | Timeout Members |
The left column is the name you use with fake permissions (below).
Fake permissions#
Fake permissions let a role use the bot's commands as if it had a permission, without giving it the real Discord permission. A moderator with a fake ban_members can ,ban through the bot, but can't ban from Discord's own menu or with a script, and antinuke still watches them. This is the safest way to set up staff.
Syntax
,fakepermissions grant <role> <permission> ,fakepermissions revoke <role> <permission> ,fakepermissions list
Example
,fakepermissions grant @Moderator ban_members ,fakepermissions grant @Moderator moderate_members ,fakepermissions revoke @Helper kick_members
Give real permissions sparingly
Roles with real Ban Members, Kick Members or Manage Roles can do damage the bot can only punish afterwards. With fake permissions, the bot does the action, logs it and applies antinuke limits first.Aliases and command rules#
Give any command your own short name, switch commands off, or limit them to some channels and roles.
Syntax
,alias add <alias> <command> ,alias remove <alias> ,alias list
Example
,alias add b ban ,alias add w warn
- Switch a command off for the whole server, or allow it only in some channels or for some roles: bot panel → Prefix commands.
- Every command and every alias shows up in
,help;,help <command>shows its syntax and the permission it needs.