MiniTwitch.Irc 1.2.12

dotnet add package MiniTwitch.Irc --version 1.2.12
NuGet\Install-Package MiniTwitch.Irc -Version 1.2.12
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MiniTwitch.Irc" Version="1.2.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MiniTwitch.Irc --version 1.2.12
#r "nuget: MiniTwitch.Irc, 1.2.12"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MiniTwitch.Irc as a Cake Addin
#addin nuget:?package=MiniTwitch.Irc&version=1.2.12

// Install MiniTwitch.Irc as a Cake Tool
#tool nuget:?package=MiniTwitch.Irc&version=1.2.12

MiniTwitch.Irc

MiniTwitch.Irc is the component responsible for Twitch chat services. The usage of this package revolves around the IrcClient class which handles connection, communication and channel management

Features

  • Package code is fully documented with XML comments
  • Full coverage of chatroom messages and events with convenient APIs
  • Built with performance and memory in mind. Nanosecond speeds, with low memory allocation
  • Exposes events as ValueTask, making for efficient & concurrent usage
  • Automatically reconnects upon disconnection & automatically rejoins channels
  • Simple & customizable ratelimiting of sending messages and joining channels
  • Allows for connecting anonymously - No need for authorization if you don't plan to send anything!
  • Understand what happens behind the scenes by supplying an ILogger. Allows you to use any logging library which implements logging abstractions

Getting Started

here is an example usage of the IrcClient class:

using MiniTwitch.Irc;
using MiniTwitch.Irc.Models;

namespace MiniTwitchExample;

public class Program
{
    static async Task Main()
    {
        Bot bot = new("myusername", "mytoken");
        await bot.Client.ConnectAsync();
        await bot.Client.JoinChannel("occluder");

        _ = Console.ReadLine();
    }
}

public class Bot
{
    public IrcClient Client { get; init; }

    public Bot(string username, string token)
    {
        Client = new IrcClient(options =>
        {
            options.Username = username;
            options.OAuth = token;
        });

        Client.OnChannelJoin += ChannelJoinEvent;
        Client.OnMessage += MessageEvent;
    }

    private ValueTask ChannelJoinEvent(IrcChannel channel)
    {
        return Client.SendMessage(channel.Name, "Hello from MiniTwitch!");
    }

    private async ValueTask MessageEvent(Privmsg message)
    {
        if (message.Content == "penis123")
        {
            await message.ReplyWith("That's my password!!");
        }
        else if (message.Content == "Wait a minute!")
        {
            await Task.Delay(TimeSpan.FromMinutes(1));
            await message.ReplyWith("I waited. Now what?");
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.12 168 2/1/2024
1.2.11 85 1/27/2024
1.2.10 109 1/10/2024
1.2.9 579 12/3/2023
1.2.8 300 11/14/2023
1.2.7 129 10/12/2023
1.2.6 106 9/26/2023
1.2.5 134 9/23/2023
1.2.4 193 7/1/2023
1.2.3 166 6/28/2023
1.2.2 146 6/4/2023
1.2.1 148 5/30/2023
1.2.0 170 5/9/2023
1.1.1 155 5/3/2023
1.1.0 169 5/1/2023
1.0.0 168 4/30/2023

This changelog is available at: https://github.com/Foretack/MiniTwitch/blob/master/MiniTwitch.Irc/CHANGELOG.md

# MiniTwitch.Irc Changelog

# 1.2.11

### Minor changes

- Added `CustomRewardId` property to privmsg struct

## 1.2.10

### Minor changes

- Updated logging strings for joining suspended/renamed/disabled/deleted channels

### Dev

- Changed internal tag values to match `ReadOnlySpan<byte>.MSum()` rather than `.Sum()`. Usages of the latter were also switched
- Tag values of Hype Chat have been removed