MiniTwitch.Irc
1.2.16
dotnet add package MiniTwitch.Irc --version 1.2.16
NuGet\Install-Package MiniTwitch.Irc -Version 1.2.16
<PackageReference Include="MiniTwitch.Irc" Version="1.2.16" />
paket add MiniTwitch.Irc --version 1.2.16
#r "nuget: MiniTwitch.Irc, 1.2.16"
// Install MiniTwitch.Irc as a Cake Addin #addin nuget:?package=MiniTwitch.Irc&version=1.2.16 // Install MiniTwitch.Irc as a Cake Tool #tool nuget:?package=MiniTwitch.Irc&version=1.2.16
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 | Versions 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. |
-
net6.0
- MiniTwitch.Common (>= 1.1.10)
-
net7.0
- MiniTwitch.Common (>= 1.1.10)
-
net8.0
- MiniTwitch.Common (>= 1.1.10)
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.16 | 183 | 8/10/2024 | |
1.2.15 | 174 | 6/1/2024 | |
1.2.14 | 97 | 6/1/2024 | |
1.2.13 | 106 | 6/1/2024 | |
1.2.12 | 247 | 2/1/2024 | |
1.2.11 | 114 | 1/27/2024 | |
1.2.10 | 135 | 1/10/2024 | |
1.2.9 | 820 | 12/3/2023 | |
1.2.8 | 327 | 11/14/2023 | |
1.2.7 | 155 | 10/12/2023 | |
1.2.6 | 139 | 9/26/2023 | |
1.2.5 | 162 | 9/23/2023 | |
1.2.4 | 219 | 7/1/2023 | |
1.2.3 | 190 | 6/28/2023 | |
1.2.2 | 167 | 6/4/2023 | |
1.2.1 | 168 | 5/30/2023 | |
1.2.0 | 194 | 5/9/2023 | |
1.1.1 | 177 | 5/3/2023 | |
1.1.0 | 195 | 5/1/2023 | |
1.0.0 | 191 | 4/30/2023 |
This changelog is available at: https://github.com/Foretack/MiniTwitch/blob/master/MiniTwitch.Irc/CHANGELOG.md
# MiniTwitch.Irc Changelog
# 1.2.16
### Minor changes
- `IrcClient` now has the property `IsConnected` for checking whether the underlying WebSocket is connected
- Added support for gigantified emote and animated message tags
- Added `Msg_warned` to `NoticeType` enum
***
# 1.2.13
### Minor changes
- Added support for `msg-param-community-gift-id` tag for gift usernotice
***
# 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