Twitch bots were created to make streaming easier and more convenient for Twitch streamers. While having moderators in chat is nice, they can make mistakes and also have a reaction time that massively exceeds the time a computer takes to react to messages written in chat. Twitch bots are in no way a replacement for a human mod-. Basically, Twitch bots are perfect for simple tasks, but you need mods to make the tough decisions.
To provide you a boilerplate, fully functional chat bot setup for twitch using .NET Core that you can either customize, you can use as is, or use as reference to implement your own bot in the programming language you prefer or are familiar with.
- Connection With IRC Twitch Chat;
- Ping: A separate thread to ping twitch server every 5 minutes (Time is customizable). This functionality prevents your twitch bot to be disconnected;
- Interpretator: A static class responsible to humanize the messages that can be read and written in the chat;
- Secrets: Is a resource from .NET only that allows you to hide or encapsulate critical information such as username, password, oauth, channel, etc of your application. You can replace this resource for a static class or dotenv to keep your critical data safe;
- Commands: This functionality is to give the application the ability to respond commands given by the viewers in the chat. You can customize the name of commands and how they can respond;
- VSCODE IDE
- VSCODE Extensions:
- C# for Visual Studio Code (powered by OmniSharp)
- .NET Core User Secrets: Extension mimicking Visual Studio's "Manage User Secrets" functionality.
- Nuget Package:
- Microsoft.Extensions.Configuration
- Microsoft.Extensions.Configuration.UserSecrets