Built-in slash commands
Every server comes with nine slash commands for moderation and channel upkeep. Members run them from a client’s message box, and the client sends them as slash_call. They’re registered by originChats, and their source is in src/slash/.
| Command | Permission | Reply visible to |
|---|---|---|
/ban |
manage_users |
Channel |
/unban |
manage_users |
Channel |
/mute |
manage_users |
Channel |
/unmute |
manage_users |
Channel |
/sever |
manage_users |
Caller only |
/unsever |
manage_users |
Caller only |
/slow |
manage_channels |
Channel |
/sticky |
manage_messages |
Caller only |
/nick |
none | Caller only |
How built-in commands run
Section titled “How built-in commands run”A call looks like this:
{ "cmd": "slash_call", "channel": "general", "command": "mute", "args": { "username": "spammer", "duration": 600, "reason": "Flooding" }}Before the command runs, the server checks that:
- The caller can see the channel, and it’s a text or voice channel, or a thread the caller can see. Otherwise:
You do not have permission to use slash commands in this channel. - The caller has the command’s permission, through a role, the
administratorpermission, or being the owner. This is a server-wide role check; channel permission lists don’t affect it. Otherwise:You do not have permission to <permission>, with underscores turned into spaces, such asYou do not have permission to manage users. - Every required option is present, there are no unknown options, and each value has the right type. Otherwise:
Missing required argument: <name>,Unknown argument: <name>, orInvalid type for argument '<name>': expected <type>. - The caller isn’t in a timeout. A timed-out caller gets a
rate_limitframe instead.
In a thread, commands that act on “the channel” act on the thread’s parent channel.
Option types map to JSON like this: str and user are strings, int is a whole number, and bool is a boolean. A user option takes a username, with or without a leading @, and matches it without regard to case.
Replies
Section titled “Replies”On success, the reply is a message from originChats sent as message_new. The message’s interaction field names the command and the caller.
- A channel reply is saved in the channel and sent to everyone who can see it.
- A caller only reply goes to the caller alone, with
ephemeral: true, and isn’t saved.
On failure, the caller gets an error:
{ "cmd": "error", "val": "Cannot mute the server owner", "src": "slash_call"}Bans a member from the server.
| Option | Type | Required | Description |
|---|---|---|---|
username |
user | Yes | Member to ban. |
reason |
str | No | Reason shown in the reply and saved in the audit log. Defaults to No reason provided. |
delete_messages |
bool | No | When true, also deletes every message the member has sent. |
Effect:
- Adds the
bannedrole to the member and saves it. - If
delete_messagesistrue, deletes all their messages and sendsmessage_deletefor each. If the deletion fails, the ban is undone and the error is returned. - Records a
user_banaudit entry with the reason,delete_messages, andmessages_deleted(a count). - Sends the member’s connections an
auth_errorframe and disconnects them, then sendsuser_leaveto everyone:
{ "cmd": "auth_error", "val": "You have been banned from this server", "reason": "banned"}Reply: 🚫 **<username>** has been banned. followed by the reason on a new line.
Errors: User '<name>' not found, Cannot ban the server owner, User '<username>' is already banned, Unable to save users.
/unban
Section titled “/unban”Lifts a ban.
| Option | Type | Required | Description |
|---|---|---|---|
username |
str | Yes | Member to unban. Unlike /ban, the type is str, not user. |
Effect: removes the banned role, saves it, and records a user_unban audit entry. The member can log in again.
Reply: ✅ **<username>** has been unbanned.
Errors: User '<name>' not found, User '<username>' is not banned, Unable to save users.
Gives a member a timeout. A timeout stops a member from posting, reacting, joining voice, and other actions, while they stay connected and can still read. See timeouts for the full list.
| Option | Type | Required | Description |
|---|---|---|---|
username |
user | Yes | Member to mute. |
duration |
int | Yes | Length in seconds. Must be greater than 0. |
reason |
str | No | Reason shown to the member and in the reply. Defaults to No reason provided. |
Effect:
- Sets the member’s timeout to end
durationseconds from now. This replaces any current timeout, even a longer one. - Saves it to
rate_limits.json, so it survives a restart. - Sends the member a
rate_limitframe withreason: "Muted: <reason>"andlengthin milliseconds. - Records a
user_timeoutaudit entry with the duration and reason.
When the timeout ends, the member gets a rate_limit frame with reason: "Your timeout has expired" and length: 0.
If several accounts share the username, the command mutes the one that logged in most recently. If their last logins tie, it mutes all of them.
Reply: 🔇 **<username>** has been muted for <duration> seconds. followed by the reason on a new line.
Errors: Duration must be a positive number, User '<name>' not found, Cannot mute the server owner, Unable to save timeout.
user_timeout does the same from a client, and returns a structured response instead of a chat reply.
/unmute
Section titled “/unmute”Ends a member’s timeout early.
| Option | Type | Required | Description |
|---|---|---|---|
user |
user | Yes | Member to unmute. The option is user, not username. |
Effect: clears the timeout and saves it, sends the member a rate_limit frame with reason: "Unmuted: your timeout has been removed" and length: 0, and records a user_timeout audit entry with duration: 0. It works even if the member wasn’t muted. Accounts sharing a username are matched as in /mute.
/unmute is the only command that clears a timeout. user_timeout needs a duration greater than 0, although a new timeout replaces the old one.
Reply: 🔊 **<username>** has been unmuted.
Errors: User '<name>' not found, Unable to save timeout.
/sever
Section titled “/sever”Hides two members from each other. Severed members don’t see each other’s messages, replies, reactions, or voice presence, and don’t get notifications about each other. See severed users for the voice behavior.
| Option | Type | Required | Description |
|---|---|---|---|
username1 |
user | Yes | First member. |
username2 |
user | Yes | Second member. |
Effect:
- Adds each member to the other’s
severedlist and saves both. - For every voice channel where both are present, sends each of them
voice_user_leftfor the other. - Records a
user_severaudit entry withtarget1andtarget2.
Reply: ✂️ **<username1>** and **<username2>** have been severed.
Errors: User '<name>' not found, Cannot sever a user from themselves, Cannot sever the server owner, '<username1>' and '<username2>' are already severed, Unable to save users.
/unsever
Section titled “/unsever”Lets two severed members see each other again.
| Option | Type | Required | Description |
|---|---|---|---|
username1 |
user | Yes | First member. |
username2 |
user | Yes | Second member. |
Effect: removes each member from the other’s severed list, saves both, and records a user_unsever audit entry with target1 and target2. It doesn’t send any voice events.
Reply: ✨ **<username1>** and **<username2>** have been unsevered.
Errors: User '<name>' not found, Cannot unsever a user from themselves, '<username1>' and '<username2>' are not severed, Unable to save users.
Sets slow mode for the channel the command is run in. Slow mode makes members wait a number of seconds between their messages.
| Option | Type | Required | Description |
|---|---|---|---|
seconds |
int | Yes | Wait between messages, in seconds. 0 turns slow mode off. |
Effect:
- Sets the channel’s
slow_mode_cooldowntoseconds, or removes it for0, and saves the channel list. - Records a
channel_updateaudit entry underchannel_management. - Sends every connected client the updated channel list.
Members with administrator, the admin role, or manage_server aren’t slowed down. Run in a thread, it applies to the thread’s parent channel.
Reply: Slow mode set to <seconds> seconds in #<channel>. or Slow mode disabled in #<channel>.
Errors: Channel not found, Slow mode can only be set on text or voice channels, Seconds must be zero or greater, Unable to save channels.
/sticky
Section titled “/sticky”Keeps one message at the bottom of the channel the command is run in.
| Option | Type | Required | Description |
|---|---|---|---|
message_id |
str | No | ID of a message in this channel. Leave it out to clear the sticky message. |
Effect: sets or clears the channel’s sticky_message, saves the channel list, records a channel_update audit entry, and sends every connected client the updated channel list.
After that, each new message in the channel (not in its threads) moves the sticky message below it. The server gives the sticky message a timestamp just after the new one, marks it edited, and sends message_delete followed by message_new for it.
The message must be in the channel itself, not in a thread.
Reply: Sticky message set. or Sticky message cleared.
Errors: Channel not found, Sticky messages can only be set in text or voice channels, Message not found, Unable to save sticky message.
Sets or clears your own nickname. Anyone can use it.
| Option | Type | Required | Description |
|---|---|---|---|
nickname |
str | No | New nickname, up to 50 characters. Surrounding spaces are removed. Leave it out or empty to clear your nickname. |
Effect: saves the nickname and sends every connected client an event:
nickname_updatewithuser(the member’s internal user ID),username(their stored username), andnickname, when a nickname is set.nickname_removewithuserandusername, when it’s cleared.
Reply: Nickname set to **<nickname>** or Nickname cleared. If you clear a nickname you don’t have, nothing changes and the reply is You don't have a nickname set. Use `/nick <name>` to set one.
Errors: Nickname too long (max 50 characters), User not found, Unable to save users.
See also
Section titled “See also”- Slash commands, plugins, and webhooks
slash_listfor how built-in commands appear to clientsslash_registerfor adding your own commands from a bot connection- Manage a server
