Skip to main content

!command

Overview

The !command feature allows you to manage chat commands for your StreamElements chatbot. It provides several subcommands to add, remove, edit, alias, show, and configure options for commands.

Usage

The general syntax for using !command is:

!command <subcommand> [arguments]

Subcommands

add

Adds a new command to the chat.

Usage:

!command add <command> <response>

Example:

!command add !test This is a test command.

Output:

@User, successfully added command test.

remove

Removes an existing command from the chat.

Usage:

!command remove <command>

Example:

!command remove !test

Output:

@User, successfully removed command test.

edit

Edits an existing command in the chat.

Usage:

!command edit <command> <new_response>

Example:

!command edit !test This is an updated test command.

Output:

@User, successfully updated command test.

alias

Shows the aliases of a command in the chat.

Usage:

!command alias <command>

Example:

!command alias !test

Output:

@User, aliases for command test: 1, 2, 3, 4, 5, 6.

show

Displays the details of an existing command in the chat.

Usage:

!command show <command>

Example:

!command show !test

Output:

@User, command test: ${channel} This is a test command. ${settitle ${1:}}

options

Adds advanced options to an existing command in the chat.

Usage:

!command options <command> <option> <value>

Example:

!command options !test -cd 10 -cost 100 -type whisper

Output:

@User, successfully updated command test.

Parameters

The following options are available for the options subcommand:

OptionDescription
cdCooldown time for the command
usercdCooldown time for the user
costCost of the command
levelUser level required to use the command
typeType of the command (say, whisper, or reply)
triggerTrigger for the command
countCount of the command usage
enableEnable the command
disableDisable the command

Aliases

The !command feature has the following alias:

  • !cmd

Additionally, some subcommands have their own aliases:

  • add: +
  • remove: -, remove, delete, del, rem
  • edit: edit, update
  • alias: alias, aliases
  • show: show, debug
  • options: options, option, opt, opts, o, 🔧

Customization

You can customize commands using various StreamElements variables and functions. For example:

  • ${channel}: Inserts the channel name
  • ${settitle ${1:}}: Allows setting a title with an optional parameter