Nightbot Commands
Nightbot ships with default commands like !commands, !title, !game, !songs and !winner. You add your own from chat with !commands add !name response (mods and the owner only), or in the control panel under Commands → Custom. Variables such as $(user), $(touser) and $(count) make responses dynamic.
Default Nightbot commands
These are built in and work as soon as Nightbot joins your channel and is a moderator. You can disable any of them, or change their userlevel and cooldown, on the Commands → Default page of the control panel.
| Command | What it does |
|---|---|
!commands | Posts a link to your channel’s command list. add, edit and delete manage custom commands (you and your mods). |
!title | Shows the stream title. !title New title changes it. Default userlevel is everyone for viewing; only moderators and up can change it. |
!game | Shows the current game. !game League of Legends changes it (moderators and up). |
!tags | Shows the stream tags. !tags 100, achievement hunting replaces them with a comma-separated list. |
!marker | Creates a Twitch stream marker, with an optional description: !marker big play. |
!commercial | Runs an ad: !commercial 30 (30, 60, 90, 120, 150 or 180 seconds). Add silent to hide the reply. Default userlevel is owner; Nightbot’s docs say it only works on partnered channels. |
!filters | Manages spam filters from chat, for example !filters caps limit 8 or !filters symbols disable. |
!permit | !permit username lets that user post links for 60 seconds. Requires !filters to be enabled. |
!poll | !poll new Title | option 1 | option 2 creates a Straw Poll (2 to 30 options). !poll results shows results. |
!regulars | !regulars add username / !regulars delete username manages the regulars list. |
!songs | Song requests: request, current, next, list, playlist, skip, delete, promote, save, volume, play, pause. Song requests must be enabled. |
!winner | Picks a random user who chatted in the past 10 minutes. |
!nightbot | !nightbot part (or leave) makes Nightbot leave your channel. join only works in Nightbot’s own chat. Owner only. |
Add, edit and delete custom commands in chat
You and your moderators can manage custom commands without leaving chat. Command names can’t contain spaces and usually start with !.
| Action | Syntax |
|---|---|
| Add | !commands add !discord Join the Discord: https://discord.gg/yourinvite |
| Edit | !commands edit !discord New Discord link: https://discord.gg/newinvite |
| Delete | !commands delete !discord |
Options: userlevel, cooldown and alias
Put options between the command name and the response. They work with both add and edit:
!commands add !so -ul=moderator -cd=30 Go follow $(touser) at https://twitch.tv/$(touser)
-ul=sets who can use the command:owner,moderator,twitch_vip,regular,subscriberoreveryone(the default).-cd=is the cooldown, the minimum number of seconds between uses.-a=makes the command call another command (an alias). The response text is passed to that command as its input, so use a variable like$(query)to forward what the user typed.
Nightbot responses can start with /me or /announce (plus /announceblue, /announcegreen, /announceorange, /announcepurple) on Twitch. Other slash commands are not supported in responses.
Add a command from the dashboard
- Sign in at nightbot.tv and open Commands → Custom in the left menu.
- Click Add Command.
- Fill in Command (for example
!discord) and Message (the response, variables allowed). - Set Userlevel and Cooldown. Use Alias only if this command should call another one.
- Save. To change or remove a command later, use the pencil or trash can button in the command table.
Useful Nightbot variables
Variables go inside the response and are replaced when the command runs. These are the ones you’ll use most:
| Variable | Outputs |
|---|---|
$(user) | Name of the person who used the command. |
$(touser) | First word after the command; falls back to the caller’s name if nothing was typed. |
$(query) | Everything typed after the command. |
$(1) to $(9) | A single word after the command, by position. |
$(count) | How many times this command has been used. |
$(channel) | Your channel name. Mostly used inside other variables. |
$(time US/Eastern) | Current time in a timezone (tz names like Europe/London). |
$(countdown Dec 25 2026 12:00:00 AM EST) | Time left until a date, or until a daily time like 5:00:00 PM EST. $(countup ...) counts time since. |
$(twitch name "{{field}}") | Twitch profile info. Fields include {{displayName}}, {{game}}, {{title}}, {{url}}, {{followers}}, {{uptimeLength}}, {{createdLength}}. |
$(urlfetch https://...) | Plain-text response from a URL (under 400 characters). Formerly called $(customapi). |
$(eval ...) | Runs JavaScript (1 second limit, synchronous only). |
$(weather location) | Current weather for a location. |
$(userlevel) | The caller’s userlevel, such as moderator. |
There is no $(uptime) variable in Nightbot. Use $(twitch $(channel) "{{uptimeLength}}") instead, as in the example below.
15 ready-to-copy Nightbot commands
Click a command to copy it, replace the placeholder links and names, then paste it into your chat while Nightbot is in the channel.
| Command | Paste this in chat |
|---|---|
| !discord | !commands add !discord Join the community Discord: https://discord.gg/yourinvite |
| !socials | !commands add !socials YouTube: https://youtube.com/@you | TikTok: https://tiktok.com/@you | X: https://x.com/you |
| !uptime | !commands add !uptime Stream uptime: $(twitch $(channel) "{{uptimeLength}}") |
| !followers | !commands add !followers $(channel) has $(twitch $(channel) "{{followers}} followers!") |
| !hug | !commands add !hug /me hugged $(touser) ($(count) hugs have been given) |
| !lurk | !commands add !lurk -cd=10 $(user) is now lurking. Enjoy the stream! |
| !so (mods) | !commands add !so -ul=moderator Go check out $(touser)! They were last playing $(twitch $(touser) "{{game}} - {{url}}") |
| !deaths (counter) | !commands add !deaths -ul=moderator Deaths this game: $(count) |
| !time | !commands add !time It is currently $(time US/Eastern) for the streamer |
| !schedule | !commands add !schedule Live Mon, Wed and Fri at 7 PM ET. Next stream in $(countdown 7:00:00 PM EST) |
| !dice | !commands add !dice $(user) rolled a $(eval Math.floor(Math.random() * 6) + 1) |
| !8ball | !commands add !8ball $(eval const r = ['Yes!', 'No.', 'Ask again later.', 'Very doubtful.', 'It is certain!']; r[Math.floor(Math.random() * r.length)];) |
| !accountage | !commands add !accountage $(touser) created their Twitch account $(twitch $(touser) "{{createdLength}}") ago |
| !post | !commands add !post Share the stream: $(x I am watching $(channel) play $(twitch $(channel) "{{game}} {{url}}")) |
| !rules | !commands add !rules /announce Be kind, no spoilers, no self-promo. Mods have the final say. |
$(count) counts uses of the command it sits in, so create a separate command for each thing you want to track. For a fuller shoutout setup, including Twitch’s native /shoutout, see the Twitch shoutout command guide.
Nightbot vs. StreamElements syntax
Commands copied from a StreamElements tutorial won’t work in Nightbot as-is. Nightbot uses !commands add and variables like $(touser), while StreamElements uses !command add (or !cmd add) and its own variable set. See the StreamElements commands guide if you use that bot, and the Twitch chat commands guide for built-in slash commands.
Want chat on stream without bot replies cluttering it? Our free Twitch chat overlay hides Nightbot and messages starting with !.
Frequently asked questions
Why is Nightbot not responding to commands?
Nightbot’s troubleshooting steps: log out of the Nightbot website and back in, then click Join Channel on the dashboard (or Nightbot Online → Leave Channel first, then join again). Also make sure Nightbot is a moderator, is not banned, and is not blocked (type /unblock nightbot on Twitch).
Can viewers add Nightbot commands?
No. Anyone can type !commands to get a link to your command list, but adding, editing and deleting commands is for you and your moderators. To let trusted people manage commands in the control panel, add them as managers.
Does Nightbot have a !followage or !uptime command?
There is no default !followage or !uptime. Uptime is easy to build with the $(twitch) variable (see the examples above). Nightbot has no built-in follow-age variable, so followage commands you find online rely on third-party APIs called through $(urlfetch).
How do I make a Nightbot command mod-only?
Add -ul=moderator when you create or edit it in chat, for example !commands edit !so -ul=moderator ..., or set Userlevel to Moderator in the control panel.
Can Nightbot post a highlighted announcement?
Yes, on Twitch. Start the response with /announce (or /announceblue, /announcegreen, /announceorange, /announcepurple). /me also works. These chat commands are not supported on YouTube, Trovo or SOOP.
Sources: Nightbot docs: Default commands · Nightbot docs: !commands · Nightbot docs: Control panel commands · Nightbot docs: Variables · Nightbot docs: Twitch variable · Nightbot docs: Troubleshooting