Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokkeez/twitchie
Event driven Twitch IRC library written in .NET 5
https://github.com/jokkeez/twitchie
bot chat event-driven irc net5 twitch twitch-chat
Last synced: about 13 hours ago
JSON representation
Event driven Twitch IRC library written in .NET 5
- Host: GitHub
- URL: https://github.com/jokkeez/twitchie
- Owner: JokkeeZ
- License: mit
- Created: 2016-04-14T18:42:08.000Z (almost 9 years ago)
- Default Branch: Twitchie2
- Last Pushed: 2021-05-08T14:07:16.000Z (almost 4 years ago)
- Last Synced: 2024-10-23T22:19:50.481Z (4 months ago)
- Topics: bot, chat, event-driven, irc, net5, twitch, twitch-chat
- Language: C#
- Homepage:
- Size: 116 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitchie
Event driven Twitch IRC library written in .NET 5[![MIT License](https://img.shields.io/static/v1?label=License&message=MIT&color=brightgreen)](https://github.com/JokkeeZ/Twitchie/blob/Twitchie2/LICENSE)
# How to use it?
1. Clone or download repository
2. Build solution with Visual Studio
3. Add built library to your project
4. Obtain required chat oauth token. You can get it easily from [here!](https://twitchapps.com/tmi/)
5. Have fun# Example?
```cs
static async Task Main()
{
// Initialize Twitchie instance, it will be disposed after ListenAsync ends.
using var twitchie = new Twitchie();
// Subscribe to events.
twitchie.OnMessage += OnMessage;// Connect to Twitch IRC.
await twitchie.ConnectAsync();
// Login to Twitch IRC with lowercase username and OAuth token.
await twitchie.LoginAsync(new("username", "oauth:password"));// Join some channel.
await twitchie.JoinChannelAsync(new("#channel"));// Start loop which will receive messages until disposed/cancelled.
await twitchie.ListenAsync();
}static void OnMessage(object sender, MessageEventArgs e)
=> Console.WriteLine($"User: {e.DisplayName} on channel: {e.Channel}: {e.Message}");
```
# Dependencies
Twitchie doesn't use any external dependencies.