Skip to content

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

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 administrator permission, 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 as You 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>, or Invalid type for argument '<name>': expected <type>.
  • The caller isn’t in a timeout. A timed-out caller gets a rate_limit frame 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.

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:

  1. Adds the banned role to the member and saves it.
  2. If delete_messages is true, deletes all their messages and sends message_delete for each. If the deletion fails, the ban is undone and the error is returned.
  3. Records a user_ban audit entry with the reason, delete_messages, and messages_deleted (a count).
  4. Sends the member’s connections an auth_error frame and disconnects them, then sends user_leave to 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.

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:

  1. Sets the member’s timeout to end duration seconds from now. This replaces any current timeout, even a longer one.
  2. Saves it to rate_limits.json, so it survives a restart.
  3. Sends the member a rate_limit frame with reason: "Muted: <reason>" and length in milliseconds.
  4. Records a user_timeout audit 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.

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.

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:

  1. Adds each member to the other’s severed list and saves both.
  2. For every voice channel where both are present, sends each of them voice_user_left for the other.
  3. Records a user_sever audit entry with target1 and target2.

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.

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:

  1. Sets the channel’s slow_mode_cooldown to seconds, or removes it for 0, and saves the channel list.
  2. Records a channel_update audit entry under channel_management.
  3. 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.

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_update with user (the member’s internal user ID), username (their stored username), and nickname, when a nickname is set.
  • nickname_remove with user and username, 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.