Nightbot custom commands
Nightbot custom commands are chat commands a streamer or moderator creates so that Nightbot replies with a set message when a viewer types the command. They are added from chat with “!commands add !name response” or from the Nightbot control panel, and the response can include variables such as $(user), $(touser) and $(count).
The chat syntax
Nightbot documents three subcommands of its built-in !commands command:
- !commands add !command_name command response
- !commands edit !command_name command response
- !commands delete !command_name
Options when adding a command
Options go between the name and the response: “!commands add !name -ul=userlevel -cd=cooldown -a=!alias response”.
- -ul= sets who can use the command: owner, moderator, twitch_vip (Twitch only), regular (your regulars list), subscriber, or everyone (the default).
- -cd= sets the cooldown, the minimum number of seconds between uses.
- -a= makes the command an alias of another command; the response text is passed to that command as its input, so put $(query) in the response to forward what the viewer typed.
Variables worth knowing
Variables are placeholders Nightbot fills in when the command runs. Among the ones it documents:
- $(user): the name of the viewer who ran the command.
- $(touser): the first word after the command, usually a name, so “!hug” can produce “$(user) hugs $(touser)”.
- $(query): everything typed after the command.
- $(count): a number that goes up every time the command runs (death counters, win counters).
- $(channel): the channel’s name.
- $(countdown) and $(countup): time until or since a date you set.
- $(time): the current time in a timezone you choose.
- $(urlfetch): the text returned by a URL, which is how commands pull in live data from elsewhere.
- $(twitch): details from a Twitch profile, such as the game a channel is playing.
- $(eval): runs a snippet of JavaScript, for commands that need logic.
Who can manage commands
The streamer and the channel’s moderators manage custom commands. The -ul option controls who can trigger a command, not who can create it.
Nightbot is a bot: it posts into your chat. Tools that only read chat, such as a chat archive or a chat-velocity monitor, are a different category and do not replace it.
Sources
Checked 2026-10-30.