Custom commands let you automate repeated messages in your chat

A custom command on Twitch is a text shortcut that triggers a message or action when you or your moderators type it in chat. Type !discord and the bot posts your Discord link. Type !socials and it lists your Twitter, Instagram, and YouTube. You set what the command is, what it does, and who can use it.

You do not need to be a programmer or pay for software to create commands. Twitch itself does not have a built-in command system, but chatbots — third-party tools that live in your chat — handle this for you. The most common free options are Nightbot, Streamlabs Chatbot, and Moobot. Each works slightly differently, but the basic idea is the same: you tell the bot what to do, and it does it every time someone types the trigger.

Commands save time during streams. Instead of typing your Discord link fifty times a night, you type it once when you set up the command. They also keep your chat cleaner because the bot answers common questions automatically, and they let you control what information goes out — you decide the exact wording, the link, the tone.

Key Takeaways

  • Custom commands run through chatbots like Nightbot or Streamlabs Chatbot, not through Twitch itself.
  • You create a command by choosing a trigger word (like !discord), deciding what message appears when someone types it, and setting who can use it.
  • Most chatbots let you set commands to run on a timer, so they post your rules or schedule automatically every few minutes without anyone typing anything.
  • Commands can pull live data like your current game, follower count, or stream uptime, so the message updates without you editing it.

Setting up Nightbot, the easiest starting point

Nightbot is free and requires no installation — it runs in your browser. Go to nightbot.tv, click Sign In, and log in with your Twitch account. Nightbot asks for permission to read your channel and post in chat. Click Authorize.

Once you are logged in, click Commands in the left menu, then Custom Commands. Click the blue Add Command button. You will see three fields: Command (the trigger), Message (what the bot posts), and Alias (optional shortcuts for the same command). Type !discord in the Command field. In the Message field, type the exact text you want posted — for example, Join our Discord: discord.gg/yourcode. Leave Alias blank for now. Click Save.

Now go to your Twitch channel and type !discord in chat. Nightbot should post your Discord link. If it does not, check that Nightbot is actually in your channel — go back to nightbot.tv, click Join Channel, and authorize it again. Once Nightbot is in your chat, the command will work.

Using Streamlabs Chatbot if you want more control

Streamlabs Chatbot is a desktop program that runs on your computer while you stream. Download it from streamlabs.com/chatbot, install it, and open it. Log in with your Twitch account. The first time you open it, Streamlabs Chatbot asks which games you play and what your channel is about — this helps it suggest features, but you can skip it.

Click the Chatbot tab at the top. On the left side, click Custom Commands. Click the + button to add a new command. A window opens with fields for Trigger (the command name), Response (the message), Cost (how many channel points it costs to use, if any), and Cooldown (how long before someone can use it again). Type your trigger — for example, !socials — and your response message. Set cooldown to something reasonable like 5 seconds so the bot does not spam if someone types it repeatedly. Click Save.

Streamlabs Chatbot must be running on your computer for commands to work. If you close the program, commands stop. This is different from Nightbot, which runs in the cloud and works whether your computer is on or off.

Commands that post automatically on a timer

Both Nightbot and Streamlabs Chatbot let you set a command to post itself without anyone typing anything. This is called a timer or scheduled message. It is useful for rules, your schedule, or reminders about your social media.

In Nightbot, go to Commands > Custom Commands, create your command as usual, then scroll down to Message Interval. Set it to a number of minutes — for example, 10 means the message posts every 10 minutes. You can also set a minimum number of chat messages between posts, so the bot does not spam during slow streams. In Streamlabs Chatbot, create the command, then check the box for Repeat and set the interval in seconds.

A common setup is a rules command that posts every 15 minutes, a schedule command every 20 minutes, and a socials command every 30 minutes. Start conservative — you can always increase the frequency if viewers do not see it enough.

Adding dynamic information that updates automatically

Commands do not have to be static text. Both Nightbot and Streamlabs Chatbot support variables — placeholders that fill in with live data. For example, $(game) in Nightbot pulls your current game title. $(uptime) shows how long you have been streaming. $(followers) shows your follower count.

To use a variable, type it into your message field exactly as the bot specifies. In Nightbot, a command might read: We are playing $(game) right now. Follow us for more! When someone types !game, the bot posts: We are playing Elden Ring right now. Follow us for more! If you switch games, the message updates automatically without you editing the command.

Streamlabs Chatbot has a different set of variables — check the documentation in the app by clicking the ? icon next to the Response field. Common ones include $game (current game), $viewers (current viewer count), and $uptime (stream duration). The syntax is slightly different from Nightbot, so copy the exact format from the help text.

Controlling who can use each command

By default, anyone in chat can type a command. You can restrict commands to moderators, subscribers, or specific user roles. This is useful for commands that cost channel points, commands that trigger actions (like a raid), or commands you only want your team to use.

In Nightbot, click on a command to edit it. Scroll to User Level and choose from Everyone, Subscriber, Moderator, or Owner. In Streamlabs Chatbot, open the command and look for User Level or Permissions — the exact label depends on your version. Set it to the role you want.

A typical setup: !discord and !socials are open to everyone. !raid or !host are moderator-only. !test is owner-only. This keeps your chat organized and prevents viewers from triggering commands you did not intend.

Troubleshooting commands that do not work

If you type a command and nothing happens, check these things in order. First, make sure the bot is actually in your channel. In Nightbot, go to nightbot.tv and look for a green checkmark next to your channel name. In Streamlabs Chatbot, make sure the program is open and running. Second, check that you typed the command exactly right — !discord is not the same as discord or !Discord. Third, check the cooldown. If you just used a command, you may have to wait a few seconds before using it again.

If the command exists but the bot does not post, check the User Level setting. If it is set to Moderator and you are not a moderator, you will not see the response. Ask a moderator to type the command instead. If a moderator types it and it still does not work, go back to the bot settings and re-save the command — sometimes a glitch prevents it from syncing.

If Nightbot commands stopped working after you were working fine, Nightbot may have been removed from your channel. This can happen if you revoke permissions in your Twitch settings. Go to twitch.tv, click your profile icon, click Settings, then Connections, and look for Nightbot. If it is there, click Disconnect and then go back to nightbot.tv to re-authorize it.

Frequently Asked Questions

Can I use the same command on multiple channels?

Yes, if you use Nightbot. Log into Nightbot, go to Settings > Channels, and add each channel you moderate or own. Create the command once, and it works on all of them. Streamlabs Chatbot is tied to one channel per installation, so you would need to set up the same commands separately on each channel.

What happens if I type a command by accident in chat?

The bot will post the response just like normal. If you do not want viewers to see it, delete the bot's message right away — you have a few seconds before it becomes permanent. To prevent accidental triggers, use command names that are unlikely to come up naturally in conversation, like !socials instead of !help.

Can commands do things other than post text?

Nightbot commands post text only. Streamlabs Chatbot can trigger alerts, sounds, or overlays if you set it up, but this requires more configuration. For most streamers, text commands are enough. If you want commands that trigger complex actions, look into Moobot or custom bots built with APIs.

Do I have to pay for chatbots?

Nightbot and Streamlabs Chatbot are free. Both have paid tiers with extra features like custom alerts or advanced moderation, but basic commands cost nothing. You do not need to pay to get your free guide.

Can viewers create their own commands?

No. Only you (and moderators, depending on the bot's settings) can create commands. Viewers can only use the commands you set up. This prevents spam and keeps your chat organized.