Twitchbot Pi


Any actions and or activities related to the material contained within this Website is solely your responsibility. The misuse of the information in this website can result in criminal charges brought against the persons in question. Cyber Security Associates Limited, will not be held responsible for any criminal charges brought against any individuals misusing the information in these projects to break the law.  


Teacher Overview 

Kali Linux is an operating system (OS) which can be used for ethical hacking and digital forensics. It is loaded with numerous tools, such as nmap and metasploit. Kali Linux also has a range of security tools and digital forensic applications that can be applied to many situations and currently is one of the most popular OS for cyber security specialists. The advantage of using Linux for most of these powerful tools is the ability to load onto any Linux version. There are other OS made for penetration testing such as Parrot OS and Black Arch but generally it is easier to access Kali Linux than these alternatives.  

The internet of things, or IoT, is a system of interrelated computing devices, mechanical and digital machines, objects, animals or people that are provided with unique identifiers (UIDs) and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction. 

IoT devices could be a person with a heart monitor implant, a farm animal with a biochip transponder, an automobile that has built-in sensors to alert the driver when tire pressure is low or any other natural or man-made object that can be assigned an IP address and is able to transfer data over a network. Increasingly, organisations in a variety of industries are using IoT to operate more efficiently, better understand customers to deliver enhanced customer service, improve decision-making and increase the value of the business. 

In this project, you will learn how to program your own Twitch Moderator Bot in python that will run on the Raspberry Pi. Twitch is a video streaming service which is predominantly aimed at gaming, which has chat displayed alongside the video which is a key feature for interacting with the streamers.  

The bot you will build will remain basic but can be adapted with little extra effort into a powerful and versatile bot. The basics we will be explaining and showing you how to write is a simple bot that will connect into. 

Once connected into Twitch’s IRC (Internet Relay Chat) chat, the bot will continually receive all messages and scan for any that matches the ban pattern. Anything that matches the pattern will be automatically banned from the server. You can also use this to timeout a user or post a message to the chat when a specific phrase is used. While this is a rather basic moderator bot, it is easily extensible with additional python knowledge and skills.  

Suggested Year Group  

The suggested age group is 16+, due to the nature of this project and the skills it is developing.  


Learning Outcomes:

  • Learn the basics of IoT; 

  • Learn about the concepts of a Twitchbot and how to create one; 

  • Learn how a Twitchbot can be used.  


Hardware Required

Component Number (Peli Case) 

Slot 4 + 5 

Slot 5 

Slot 9 

Slot 3 

Slot 3 

Slot 5 

Slot 1 

Component Number (Box Case) 

Slot 1 

Slot 10 

Slot 2 

Slot 11 

Slot 11 

Slot 12 

Slot 13 


Raspberry Pi + Case 

Kali Linux SD Card 

TFT Screen 


Wireless Keyboard 

Wireless Mouse 

Power Supply Unit 


Video Guide



This project is designed to introduce you to a twitchbot and the applications they have within IoT. You will have created a twitch account and have authorised it to provide you with access to your chat through IRC. You would have then used the Raspberry Pi to write a python script to ban or timeout people when they say a banned word or phrase from your BAN_PAT list. Twitchbots are extremely powerful tools, and this tutorial is just scratching the surface of what you can achieve with it.