Custom commands
XMOD has two kinds of commands. They are separate and never get in each other's way.
Custom Send Commands
Quick actions for your moderators, built from steps - send a message or embed, run a punishment, or assign a role. They appear as buttons in the mod menu inside the tool.
Custom Commands
Commands your members can run in Discord, like /rules. Pick a reply,
dress it up as an embed, add actions that run afterwards, and choose who can
use it and how often. Build them under Bot settings, Custom Commands.
Slash or a prefix
Each server chooses how members trigger these. Slash commands are picked
from Discord's own list after typing /. Prefix means typing the
command in chat behind a character you choose, like !rules. You can
turn on both.
The prefix can be most punctuation - !, ?, . and so on.
Letters and digits are not allowed because they would fire on ordinary words,
and neither are the characters Discord uses to start a mention.
Reading chat requires the Message Content intent, which you turn on in the Discord developer portal under Bot, Privileged Gateway Intents. Slash commands work without it. If you switch a server to prefix only, the slash commands are removed from Discord so the picker never offers something that does nothing.
Variables
Anywhere you write a reply you can drop in a variable, and the bot fills it in when the command runs. The builder lists them as buttons, grouped by what they are about.
- The member:
{user.mention},{user.name},{user.nick},{user.id},{user.created},{user.joined}. - The server:
{server},{server.id},{server.owner},{member_count}. - The channel:
{channel},{channel.name}. - What they typed:
{args}for all of it,{args.1}for the first word,{args.2+}for the second word onwards, and{target}for the first member they mentioned. - Time:
{date},{time},{timestamp}.
A variable the bot does not know is left as you wrote it rather than blanked, so a typo shows up in the reply instead of quietly disappearing.
Embeds
Turn on Send as an embed and the builder opens: a colour, a title and title link, an author line with an icon, a thumbnail, a large image, a footer, a timestamp, and up to 25 fields that can sit side by side. A preview beside the form shows roughly what it will look like in the channel.
Your reply text becomes the embed's description, so a command written before the builder existed still looks exactly as it did.
Actions after the reply
A command can also do something once it has answered: give or take roles, add reactions, delete the message that triggered it, post a copy of the reply into another channel, and apply a punishment - a warning, a timeout, a kick or a ban.
A punishment can land on whoever ran the command or on the first member they
mentioned, which is what makes something like !report @someone possible.
Warnings go through the same place moderator warnings do, so they count
towards warn escalation.
The bot can only punish members below its own highest role and needs the matching permission on the server. A punishment it cannot apply is skipped and logged; the command still replies.