How to Add a Command on Twitch (And Make It Work for Your Stream)

Custom commands are one of the most practical tools a Twitch streamer can set up. They let your chat get instant answers to common questions — your schedule, your gear, your social links — without you stopping mid-game to type the same response for the hundredth time. Here's how the whole system works, what your options are, and what actually determines how complex your setup needs to be.

What a Twitch Command Actually Is

A chat command is a keyword — usually starting with ! — that a bot monitors for in your stream chat. When a viewer types !discord, for example, the bot responds automatically with your Discord invite link. You're not typing anything. The bot handles it.

Twitch itself doesn't have a native built-in command system in the traditional sense. What it does have is Twitch's built-in AutoMod and moderation tools, but those aren't designed for custom response commands. For actual command functionality, you need a chatbot connected to your channel.

The most widely used options include:

  • Nightbot — browser-based, no download required, works across Twitch and YouTube
  • StreamElements — integrates with an overlay system, strong for alert and loyalty features
  • Moobot — focused on Twitch specifically, straightforward dashboard
  • Fossabot — newer, clean interface, generous free tier

Each connects to your Twitch account via OAuth authorization, then monitors your chat on your behalf.

How to Add a Basic Custom Command 🛠️

The exact steps vary slightly between bots, but the general flow is consistent:

  1. Create an account on your chosen bot's website and log in with your Twitch credentials
  2. Authorize the bot to access your channel (this is done through Twitch's own permission system)
  3. Add the bot as a moderator in your Twitch chat by typing /mod [botname] — this lets it post messages without restrictions
  4. Navigate to the Commands section in the bot's dashboard
  5. Create a new command by entering the trigger (e.g., !schedule) and the response text
  6. Set permissions — decide who can trigger it: everyone, subscribers, moderators only, etc.
  7. Save and test by typing the command in your own chat

Most bots also let you configure a cooldown period — the minimum time between command triggers — to prevent spam in active chats.

Variables That Change How Commands Behave

Not all commands are simple text responses. Most bots support dynamic variables that make responses context-aware:

Variable TypeWhat It DoesExample Output
$(user)Names the viewer who triggered the command"Hey, StreamFan42!"
$(channel)Displays your channel name"Check out TechFAQsLive"
$(count)Tracks how many times a command has been used"That's been asked 47 times!"
$(game)Pulls the current game you're streaming"Currently playing Elden Ring"
$(uptime)Shows how long the stream has been live"Stream has been live for 2h 14m"

These pull live data directly from Twitch's API, so the responses stay accurate without you updating them manually.

Command Permission Levels Matter

Who can trigger a command is just as important as what it does. Most bots organize permissions into tiers:

  • Everyone — any viewer, including non-followers
  • Subscribers — follower or subscriber tier only
  • Regular/VIP — users you've manually designated
  • Moderators — your mod team
  • Broadcaster — you only

Setting the wrong permission level is a common mistake. A command like !ban or !timeout that runs a moderation action should obviously be restricted. A command like !uptime or !socials is fine for everyone.

More Advanced Command Types

Once you're comfortable with static responses, most bots support command aliases, counter commands, and API-based commands. 🔧

  • Aliases let multiple triggers fire the same response (!twitter and !tweet both returning your Twitter link)
  • Counter commands increment a number each time they're used, great for tracking deaths in a game or hype moments
  • API commands pull external data — current song playing, weather for a location, follower counts — by calling a web URL

Some bots, like Fossabot and StreamElements, support custom JavaScript or scripting for more complex logic, though this requires comfort with basic programming concepts.

The Factors That Vary by Streamer

How elaborate your command setup should be depends on things that are specific to your channel:

  • Stream size — a small channel with 10 average viewers doesn't need the same spam protection as one with 500
  • Content type — game streamers often want death counters and game-specific commands; IRL or talk streamers may prioritize schedule and link commands
  • Technical comfort — some bots have steeper learning curves but more flexibility; others prioritize simplicity
  • Existing tools — if you're already using StreamElements for overlays, adding commands there keeps everything in one dashboard; if you're not, Nightbot's standalone simplicity might fit better

The right level of complexity, the right bot, and the right permission structure all trace back to what your stream actually looks like on a given day — how active your chat is, what your viewers consistently ask, and how hands-on you want to be with moderation. Those details don't have a universal answer.