Nightbot: How to Set Up a Twitch Chatbot

by Fabio

Nightbot is one of the most popular chatbots on the internet. Its uncomplicated integration into Twitch makes it a go-to option for less tech-savvy streamers. Its functionalities are more than enough to satisfy the needs of the average broadcasters. So what is a chatbot and how does it work?

What is a Chatbot?

A chatbot takes part in your stream’s chat. It can be prompted to respond to your viewers. Say, for instance, someone is watching an esports tournament stream. They’re listening, but can’t quite make out who is actually casting the match. If you’ve set up a chatbot, they can just write !casters in the chat, after which the chatbot will reply with an automated answer that you set beforehand. 

You can set up a chatbot with potentially hundreds of different replies. Some programs even manage to create dynamic replies, for instance with regards to the uptime of your stream. The possibilities are virtually limitless. One of those mighty chatbots is called Nightbot. This service sees widespread use all around Twitch and is one of the most used chatbots on the internet.

How to Add Nightbot to Twitch

Nightbot works from within the cloud. Unlike other solutions like StreamLabs, it requires no installation on your PC. This is perhaps the most user-friendly approach possible, since most streamers wouldn’t really know how to set up a chatbot server that communicates with their stream.

First, you’ll need to head to nightbot.tv, where you can log in through your Twitch account. Alternatively, you can do just the same with a YouTube Live or Mixer account, which allows you to insert Nightbot into these streaming services as well. As soon as you are logged into the site, you’ll be presented with a Dashboard.

The Nightbot dashboard
The Nightbot dashboard

Nightbot Dashboard

This dashboard gives you a quick overview of your top chatters, top command and recent chat activity. Most importantly, this is where you can direct Nightbot to enter your channel. After hitting ‘Join Channel’, the bot will appear in your chat. However, you have to do one more thing before Nightbot can jump into action. In your chat, you have to give moderator rights to the bot. Otherwise it won’t be able to fulfill a lot of its tasks. In your own chat – after you’ve let Nightbot join it – simply type  \mod nightbot. Now, the chatbot has the required privileges to start answering your viewers’ questions. Before that, however, you might want to create some commands.

There are quite a few static and fixed commands imprinted into Nightbot. For instance, !game will always automatically return the name of the game you are playing at the moment. You can find these standard commands under Commands -> Default, where you can disable them as well. By default, they’ll all be enabled. Lots of important and useful chatbot commands are already part of this list, so be sure to check it out entirely. Otherwise you might end up creating commands that are already implemented for you!

Nightbot Spam Protection

Before diving into how to create and use Nightbot commands, we’re going to take a look at some more basic features. Since Nighbot acts a moderator of sorts, it can ban or timeout viewers from your chat and delete messages. Spam protection allows you to block certain phrases, all-caps messages, or copy-paste text. Additionally, you can prohibit users from posting links. 

You can further modify all of these functions. For instance, you can blacklist not only specific words, but other phrases that contain them. You can enable link-posting exclusively for your mods, so that they can still provide URLs for your viewers. This gives you the necessary tools to fine-tune your chatbot into a comprehensive informational resource. 

One of the more practical features of this chatbot is its ability to take in user suggestions for music. With this you can create a viewer-driven playlist. Of course, Nightbot it capable of much more.

Custom Nightbot Commands

Under Commands -> Custom, you are presented with the list of custom commands that you have created. Obviously, it’s going to be empty at first. Through the Add Command button, you can start to populate the list. Adding custom Nightbot commands is actually quite simple.

When adding a custom command, Nightbot prompts the user with this window
When adding a custom command, Nightbot prompts the user with this window

First, you’ll have to specify the actual name of the command. Then, there’s the response text, which you can modify with dynamic content if you like (more on that later). You can also determine the type of users that can access this command. Sometimes you want to provide special features only for your followers or subscribers. A cooldown can be specified, so that users can’t just spam certain commands without end. 

Lastly, there’s the alias function, with which you can map certain Nightbot commands onto other commands. Say, for instance, you have your song requests set to !song x (x being the YouTube URL of the song). Now you want to provide your viewers with the option to request your favourite song, which can be found via the link “youtube.com/s0mer4nd0ms0ng”. Should your viewers always have to request this song manually? Of course not. As an example, you could define a command called !favsong and set its alias to !song youtube.com/s0mer4nd0ms0ng. Now, your viewers won’t have to manually type in the song link every single time! 

Dynamic Nightbot Commands

Beyond music suggestions, the bot can play around with user input and generate dynamic content based off of what your viewers write. Nightbot really is an fully-featured chatbot for your Twitch, Mixer and YouTube Live streams. With this guide we have only covered the basics of how to register on the site and how to get it running. There are infinite possibilities when it comes to working with user input. If you’re really interested in digging deep into what the chatbot has to offer, we recommend visiting their extensive documentation on how to use Nightbot.

If your aim is to start hosting esports tournaments, we recommend taking a look at our most recent guides on broadcasting. For instance, you might want to learn how to record you game’s video output or maybe you’re not sure how to create overlays for your streams. We will continue to update our Bitspawn blog with useful resources on broadcasting, so stick around!

You may also like