Skip to content

conorvenus/TwitchIRC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A declarative framework for developing Twitch chat bots in C# 🤖

Introduction

TwitchIRC is a pre-alpha framework built in C#, for interacting with the Twitch API. With a strong focus on DX and ease-of-use, TwitchIRC is declarative and modular, with an optional commands framework inspired by other chat bot frameworks.

Usage

using TwitchIRC;
using TwitchIRC.Types;

IRCClient client = new IRCClientBuilder()
	.WithAccessToken(...)
	.WithUsername(...)
	.Build();

client.OnReady += () => client.Send("JOIN #channel");
client.OnChatMessage += (IRCChatMessage msg) => Console.WriteLine(msg.Content);

client.Run();

Features

  • Parses IRC messages.
  • Authenticates using PASS and NICK with Twitch.
  • Responds to keep-alives.
  • Handles event callbacks for OnReady, OnMessage and OnChatMessage.
  • Implemented a declarative command framework using reflection.

TODO

  • Incorporated proper unit testing using xUnit and FluentAssertions.
  • Handle socket disconnects, reconnect requests, etc.
  • Receive Twitch-specific commands and other IRC capabilities.
  • Support the Twitch IRC tags for extra metadata, such as badges, emotes, etc.
  • Implemented additional events for OnUserJoin and OnUserPart of a given channel.
  • Add custom types for users, channels, etc, rather than just using a string.
  • Extend the IRC client for use with other parts of the Twitch API, to send whispers, handle alerts, etc.

Releases

No releases published

Packages

No packages published

Languages