Skip to content

slash_list

Fetch every slash command you can run: the server’s built-in commands, commands from JavaScript plugins, and commands registered by connected bots. Use it to fill a command picker, then keep the list current with slash_add and slash_remove events.

{
"cmd": "slash_list"
}

To check that a thread is visible at the same time, add thread_id:

{
"cmd": "slash_list",
"channel": "help",
"thread_id": "8a1f4c2e-6b3d-4e9a-b7c5-1d0e2f3a4b6c"
}
Field Type Required Description
thread_id string No A thread you want to run commands in. The server checks that you can view it.
channel string No The thread’s parent channel. Used only with thread_id; if set, it must match.

channel alone does nothing. The command list is the same in every channel.

{
"cmd": "slash_list",
"commands": [
{
"name": "nick",
"description": "Set or clear your display nickname",
"options": [
{
"name": "nickname",
"description": "Your new nickname (leave empty to clear)",
"type": "str",
"required": false,
"choices": null
}
],
"whitelistRoles": null,
"blacklistRoles": null,
"ephemeral": true,
"registeredBy": "originChats"
}
]
}

commands holds only the commands you are allowed to run. A command is left out if it needs a permission you lack, if it has a whitelistRoles list and you have none of those roles, or if you have one of its blacklistRoles. The definition fields are described on slash_register.

registeredBy tells you where a command comes from:

  • originChats for a built-in command.
  • plugin:<name> for a JavaScript plugin.
  • The bot’s username for a command registered with slash_register.

When you sent thread_id, the response also has thread_id and channel, set to the thread’s parent channel.

Every server has these commands. They run on the server, so no bot needs to be connected.

Command Options Permission Reply
/nick nickname (str, optional) None Only you
/sticky message_id (str, optional) manage_messages Only you
/slow seconds (int) manage_channels Channel
/ban username (user), reason (str, optional), delete_messages (bool, optional) manage_users Channel
/unban username (str) manage_users Channel
/mute username (user), duration (int, seconds), reason (str, optional) manage_users Channel
/unmute user (user) manage_users Channel
/sever username1 (user), username2 (user) manage_users Only you
/unsever username1 (user), username2 (user) manage_users Only you

See built-in slash commands for what each one does.

Any authenticated member can call it. It works while you are timed out.

Only when thread_id is set:

val When
Thread not found No thread has that ID.
Thread does not belong to this channel channel is set and isn’t the thread’s parent.
You do not have permission to view this thread You can’t see the thread.