!command
- Access
- Moderator
- Aliases
!cmd
The !command (aliased as !cmd) command suite allows streamers and moderators with the appropriate permissions to manage custom chat commands directly from the chat interface. It provides subcommands to add, remove, edit, view aliases, show details, and configure advanced options for any custom command.
The general syntax follows this pattern:
!command <subcommand> [arguments...]Or using the alias:
!cmd <subcommand> [arguments...]Replace <subcommand> with one of the functions listed below and [arguments...] with the required parameters for that specific subcommand.
Subcommands
Section titled “Subcommands”Here are the available subcommands for !command:
Creates a new custom command.
Syntax:
!command add !<command_name> <response_text>Example:
remove
Section titled “remove”Deletes an existing custom command.
Syntax:
!command remove !<command_name>Example:
Changes the response text of an existing custom command.
Syntax:
!command edit !<command_name> <new_response_text>Example:
Shows the aliases associated with a specific command, or adds/removes an alias.
Syntax:
!command alias !<command_name>!command alias add !<command_name> !<alias_name>!command alias remove !<command_name> !<alias_name>Example (listing aliases):
Example (adding an alias):
Example (removing an alias):
Displays the full response text and configuration details (level, cost, cooldowns) of a command.
Syntax:
!command show !<command_name>Example:
options
Section titled “options”Configures advanced settings like cooldowns, cost, permission level, response type, trigger name, enabled status, and usage count for a command. See the Parameters section below for details on the available options.
Syntax:
!command options !<command_name> <option1> <value1> [option2] [value2] ...Example (setting multiple options):
Parameters (for options subcommand)
Section titled “Parameters (for options subcommand)”When using the !command options subcommand, you specify settings using flags followed by their values. You can set multiple options in a single message. These parameters allow fine-grained control over a command’s behavior:
| Parameter | Description | Accepted Values | Example Usage |
|---|---|---|---|
-cd |
Sets the global command cooldown (minimum time between any use of the command). | <seconds> (e.g., 10) |
-cd 10 |
-usercd |
Sets the user-specific cooldown (minimum time the same user must wait before using the command again). | <seconds> (e.g., 30) |
-usercd 30 |
-cost |
Sets the loyalty points cost charged each time the command is used. If a user doesn’t have enough points, the command silently does nothing (no error message is sent). Requires the StreamElements Loyalty System (enabled in the dashboard under Loyalty → Loyalty Settings). | <points> (e.g., 50) |
-cost 50 |
-level |
Sets the minimum user permission level required. Takes a number: 100 (Everyone), 250 (Subscriber), 300 (Regular), 400 (VIP), 500 (Moderator), 1000 (Super Moderator). No other values are accepted. |
<number> (e.g., 500) |
-level 500 |
-type |
Sets how the bot responds. Platform support for reply, mention, and whisper may vary. |
say (default), reply, mention, whisper |
-type whisper |
-trigger |
Renames the command, changing the trigger word used to invoke it. | <new_name> (e.g., !links) |
-trigger !links |
-enable |
Enables the command. | N/A | -enable |
-disable |
Disables the command, preventing anyone from using it. | N/A | -disable |
-count |
Manually sets the command’s usage counter, useful for resetting or adjusting the value used by $(count). |
<number> (e.g., 0) |
-count 0 |
Subcommand aliases
Section titled “Subcommand aliases”Each subcommand also accepts its own shorthand aliases:
remove:delete,del,remedit:updatealias:aliasesshow:debugoptions:option,opt,opts,o,🔧
Related Commands
Section titled “Related Commands”!commands: Lists available commands.$(count): Variable to display the usage count of a command.$(user): Variable representing the user executing the command.$(channel): Variable representing the channel name.- See the full list of Chatbot Variables.
-
What’s the difference between global cooldown (
-cd) and user cooldown (-usercd)? Global cooldown (-cd) applies to everyone – once the command is used, no one can use it again until the cooldown expires. User cooldown (-usercd) applies only to the individual user – they have to wait, but other users can still use the command if the global cooldown has passed. -
How do I reset a command’s usage counter? Use the
optionssubcommand with the-countparameter:!command options !<command_name> -count 0 -
Can I make a command respond with a whisper instead of a public message? Yes, use the
optionssubcommand with the-typeparameter:!command options !<command_name> -type whisper. Note that whisper functionality depends on the chat platform. -
How do I add or remove a command alias via chat? Use the
aliassubcommand withaddorremove:!command alias add !<command_name> !<alias_name>or!command alias remove !<command_name> !<alias_name>. -
I’m a moderator, but
!command addisn’t working. Why? Double-check that the!commanddefault command itself hasn’t been disabled or had its permission level changed from the default (Moderator). You can check its settings in theDefault Commandssection of your StreamElements Dashboard.