Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
679a73a
Migrate to TwitchLib.Communication 2.0 (#220)
Bukk94 Apr 18, 2023
17df718
Fix prerelease
Syzuna Apr 18, 2023
49d12e2
Reimplemented message throttling (#221)
Bukk94 May 4, 2023
c41f392
remove obsolete methods
AoshiW May 4, 2023
f9198cb
performance improvement
AoshiW May 4, 2023
166ee73
update dotnet-version in .yml
AoshiW May 4, 2023
e56e6d7
Add `Syste.Memory` package
AoshiW May 5, 2023
0facd27
upgrade to the latest version of `TwitchLib.Communication`
AoshiW May 5, 2023
313fac0
Merge pull request #225 from AoshiW/performance-improvement-v2
Syzuna May 25, 2023
6a993b1
Better logging
AoshiW May 26, 2023
624637a
missing change
AoshiW May 26, 2023
4eb1f5e
fix eventId
AoshiW Jun 8, 2023
48a434e
Merge pull request #226 from AoshiW/better-logging
Syzuna Jun 8, 2023
92ab79b
Missing handshake on reconnect fix
JulanDeAlb Jun 10, 2023
f3f460b
Remove check whether TwitchUser != joining channel
JulanDeAlb Jun 10, 2023
547614d
remove unused code
AoshiW Jun 11, 2023
6b2e0bc
remove timeout reason
AoshiW Jun 11, 2023
c9e7d8c
Merge pull request #227 from JulanDeAlb/dev
Syzuna Jun 15, 2023
deb4b02
Merge pull request #228 from AoshiW/unused-code
Syzuna Jun 15, 2023
c377403
ReplaceEmotes prefix and suffix addition, Async Task Events (#223)
GimliCZ Jun 28, 2023
b58356f
Rewrite IrcParser, pass through raw text to IrcMessage and fix other …
neon-sunset Jun 28, 2023
34da54b
fix #215 and expose (chat/whisper)CommandIdentifiers (#229)
AoshiW Jun 28, 2023
ab5ac32
faster/efficient `EmoteExtractor` and `Helpers`
AoshiW Jul 2, 2023
495f1b3
Fix `MessageEmoteCollection` + additional fixes/improvements (#232)
neon-sunset Jul 3, 2023
fd13176
Merge pull request #233 from AoshiW/better-EmoteExtractor
Syzuna Jul 3, 2023
daae1e4
Make sure IrcMessage.Tags is never null and devirtualize the dictiona…
neon-sunset Jul 3, 2023
80ed848
Make the last 3 events async
neon-sunset Jul 3, 2023
4cb4986
Sync ITwitchClient events with TwitchClient
neon-sunset Jul 3, 2023
a9c706f
Fix missed moderators parsing on moderators received
neon-sunset Jul 4, 2023
a8ed678
Add Multitargetting for standard 2.0/2.1 and .net 6/7
AoshiW Jul 4, 2023
8b4eeaf
update TwitchLib.Communication
AoshiW Jul 4, 2023
20c4939
Merge pull request #236 from AoshiW/Multitargetting
Syzuna Jul 4, 2023
a9066e2
Merge pull request #234 from neon-sunset/fix-null-tags-in-ircmessage
Syzuna Jul 8, 2023
97f87dc
Merge pull request #235 from neon-sunset/make-remaining-events-async
Syzuna Jul 8, 2023
e5fdc89
Fix _client_OnMessage handling
neon-sunset Jul 9, 2023
e19ead4
Address feedback: for now, asynchronously block _client_OnMesage with…
neon-sunset Jul 9, 2023
9862951
Merge pull request #239 from neon-sunset/fix-client-onmessage
Syzuna Jul 19, 2023
46811c9
Hype Chat (#240)
AoshiW Jul 25, 2023
761e2da
Replace events reflection (#237)
Bukk94 Jul 30, 2023
989bc8d
extracted tag parsing logic, changes for NET6/NET7 (#238)
AoshiW Aug 4, 2023
c3b730b
Cleanup and simpler command handlers (#241)
AoshiW Aug 5, 2023
b2bd5c7
Models/ChannelState: FollowersOnly is Timeout.InfiniteTimespan for of…
swiftyspiffy Aug 5, 2023
e519ed9
new properties and updated doc
AoshiW Aug 6, 2023
29157f1
MessageEmote: fixes emote replaced string with a hack until this can …
swiftyspiffy Aug 7, 2023
b05e381
IrcParser: make public and speed-up by another up to 15% by improving…
neon-sunset Aug 9, 2023
431f636
Bump up BDN version
neon-sunset Aug 9, 2023
5fea08f
Merge pull request #247 from neon-sunset/make-ircparser-public
Syzuna Aug 11, 2023
d6d26ef
Merge pull request #245 from AoshiW/PRIVMSG-tags
Syzuna Aug 13, 2023
56f89f5
nullable anotation for the `.Models` project except models for `User…
AoshiW Sep 16, 2023
4f908e6
Update communication library to version 2.0, removed sync overloads (…
Bukk94 Sep 16, 2023
0c05d2e
nullable annotation and extraction of `RaisesAsync` from modified `As…
AoshiW Oct 4, 2023
c14be36
Refactor USERNOTICE models (#250)
AoshiW Oct 22, 2023
414b712
chore: updated actions to their latest versions
Syzuna Oct 28, 2023
e014d80
nullable annotation for `MessageEmote.cs` (#251)
AoshiW Oct 28, 2023
70dead0
Nullable anotation Part2 (+1 small "bux" fix) (#252)
AoshiW Oct 30, 2023
c1fda4c
fix typos (#253)
AoshiW Oct 30, 2023
167e932
.net 8 changes, update dependencies
Nov 6, 2023
bb8afa2
removing obsolete events (#256)
AoshiW Nov 10, 2023
890220b
update dependencies
Nov 14, 2023
9b3a0c3
`SendMessage` => `SendMessageAsync`
Nov 28, 2023
37c54cb
Update EmoteExtractor to support multibyte
Hampo Dec 4, 2023
12a2d88
Add test for EmoteExtractor
Hampo Dec 4, 2023
cf5f549
Update check-buildstatus.yml
Syzuna Dec 4, 2023
1066b8b
Merge branch 'TwitchLib:dev' into dev
Hampo Dec 4, 2023
cdf0e4c
Merge pull request #260 from Hampo/dev
Syzuna Dec 4, 2023
0928dbc
Merge pull request #258 from AoshiW/async-method
Syzuna Dec 4, 2023
e20160e
Merge pull request #254 from AoshiW/net8
Syzuna Dec 4, 2023
d4d9679
Update TwitchLib.Communication
Syzuna Jan 3, 2024
0fa8038
aggregation of some flags into one struct (`UserDetail`) to reduce th…
AoshiW Feb 21, 2024
aadb9a5
catch parsing error
Mar 25, 2024
f54d60b
Merge pull request #264 from AoshiW/parsing-error
Syzuna Mar 25, 2024
8c5e0ae
Updated ConnectionCredentials to use an anonymous user by default (#257)
ChrisBlueStone Apr 6, 2024
de39bd0
Improve EmoteExtractor test (#261)
Hampo Apr 6, 2024
2ffc7f7
fix disconnect event type in TwitchClient
Apr 24, 2024
5677f50
Merge pull request #265 from AoshiW/fix-typo
Mahsaap Jun 19, 2024
5ef35d5
adds MsgParamOriginId to GiftedSubscription model (#267)
swiftyspiffy Sep 6, 2024
0a20b31
added github.run_number to preview-release.ym
AoshiW Jul 20, 2025
41bcdd5
move logic for creating an anonymous user to a new constructor
AoshiW Jul 20, 2025
427e2c1
increase patch version
AoshiW Jul 20, 2025
b3ab00a
Fix bug (I have no idea how I could have done something so stupid.)
AoshiW Jul 27, 2025
5f79221
fix password for anonymous user
AoshiW Jul 27, 2025
641d6b2
removed builders
Aug 6, 2025
cf24c9e
Removed deprecated .NET versions
Aug 6, 2025
4f5affd
[skip-ci] Example and readme (#272)
AoshiW Aug 6, 2025
1a45f63
[skip-ci] fix default channel_name
AoshiW Aug 7, 2025
96ec90c
[skip-ci] fix pong response
AoshiW Aug 7, 2025
3710fe9
update command identifier to `string` (#273)
AoshiW Aug 15, 2025
e91a370
[skip-ci] set `IsPackable` to false
AoshiW Sep 19, 2025
cb803b4
[skip-ci] fix typo
AoshiW Sep 19, 2025
5283590
update dependencies, add `Directory.Build.props`
Nov 5, 2025
cd636ab
Updated preview-release.yml to support Trusted Publishing
Syzuna Nov 9, 2025
d7224d3
.NET 10; migrate to slnx
Nov 12, 2025
8f17644
[skip-ci] Update release.yml to support trusted publishing
Syzuna Nov 13, 2025
1e7ea7c
delete TwitchLib.Communication
Nov 14, 2025
939ff8f
add event for `slow_on`/`slow_off` TwitchLib/TwitchLib#1071
Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/check-buildstatus.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check TwitchLib.Api PR Build Status
name: Check TwitchLib.Client PR Build Status

on:
pull_request:
Expand All @@ -10,12 +10,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v5
with:
dotnet-version: 6.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Api
- name: Build TwitchLib.Client
run: dotnet build --no-restore
- name: Test TwitchLib.Client
run: dotnet test --no-build --verbosity normal
20 changes: 15 additions & 5 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,31 @@ jobs:
release-preview:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
runs-on: ubuntu-latest
permissions:
id-token: write # enable GitHub OIDC token issuance for this job

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- uses: benjlevesque/short-sha@v3.0
id: short-sha
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v5
with:
dotnet-version: 6.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Client
run: dotnet build -c Release --no-restore
- name: Pack TwitchLib.Client
run: dotnet pack TwitchLib.Client.sln -v normal -c Release -o nugets --no-build --version-suffix "preview-${{ github.sha }}"
run: dotnet pack -v normal -c Release --no-build --version-suffix "preview.${{ github.run_number }}.${{ steps.short-sha.outputs.sha }}"
# Get a short-lived NuGet API key
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push to Nuget
run: dotnet nuget push "./nugets/*.nupkg" -k ${{ secrets.API_NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
run: dotnet nuget push "./artifacts/package/release/*.nupkg" --api-key ${{steps.login.outputs.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
- name: Send Discord Notification
uses: sarisia/actions-status-discord@v1
if: always()
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,34 @@ jobs:
release:
if: "contains(toJSON(github.event.commits.*.message), '[Release]')"
runs-on: ubuntu-latest

permissions:
id-token: write # enable GitHub OIDC token issuance for this job

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v5
with:
dotnet-version: 6.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Client
run: dotnet build -c Release --no-restore
- name: Pack TwitchLib.Client
run: dotnet pack TwitchLib.Client.sln -v normal -c Release -o nugets --no-build
run: dotnet pack -v normal -c Release --no-build
# Get a short-lived NuGet API key
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push to Nuget
run: dotnet nuget push "./nugets/*.nupkg" -k ${{ secrets.API_NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
run: dotnet nuget push "./artifacts/package/release/*.nupkg" --api-key ${{steps.login.outputs.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
- name: Send Discord Notification
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: "Release Nuget Package"
username: "TwitchLib Deploy"


7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/

# BenchmarkDotNet artifacts
BenchmarkDotNet.Artifacts/

# =========================
# Operating System Files
# =========================
Expand Down Expand Up @@ -233,4 +236,6 @@ $RECYCLE.BIN/
*.msp

# Windows shortcuts
*.lnk
*.lnk

.idea/*
36 changes: 36 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project>
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->

<PropertyGroup>
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Features>strict</Features>

<NeutralLanguage>en-US</NeutralLanguage>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<!--Package-->
<PropertyGroup>
<Authors>swiftyspiffy, Prom3theu5, Syzuna, LuckyNoS7evin</Authors>
<Copyright>Copyright 2025</Copyright>
<PackageIcon>twitchlib.png</PackageIcon>
<PackageProjectUrl>https://github.com/TwitchLib/TwitchLib.Client</PackageProjectUrl>
<RepositoryUrl>https://github.com/TwitchLib/TwitchLib.Client</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageTags>twitch library irc chat c# csharp api events net</PackageTags>
<PackageReleaseNotes>a lot of changes</PackageReleaseNotes>
<VersionPrefix>4.0.1</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion>
<FileVersion>$(VersionPrefix)</FileVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
<None Include="..\twitchlib.png" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
83 changes: 81 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,83 @@
# TwitchLib.Client
# TwitchLib.Client
Client component of TwitchLib.

For a general overview and example, refer to https://github.com/TwitchLib/TwitchLib/blob/master/README.md
> [!TIP]
> With the introduction of Chat on EventSub, it is recommended to upgrade your chatbots that are using Twitch IRC to use EventSub (for reading chat messages and roomstates) and Twitch API (for sending chat messages).

## Installation

| NuGet | | [![TwitchLib.Client][1]][2] |
| :--------------- | ----: | :---------------------------------------------------------------- |
| Package Manager | `PM>` | `Install-Package TwitchLib.Client -Version 4.0.1` |
| .NET CLI | `>` | `dotnet add package TwitchLib.Client --version 4.0.1` |
| PackageReference | | `<PackageReference Include="TwitchLib.Client" Version="4.0.1" />` |
| Paket CLI | `>` | `paket add TwitchLib.Client --version 4.0.1` |

[1]: https://img.shields.io/nuget/v/TwitchLib.Client.svg?label=TwitchLib.Client
[2]: https://www.nuget.org/packages/TwitchLib.Client

## ⚠ Breaking Changes in Version 4.0.1 ⚠

Version 4.0.1 contains breaking changes.
- Removed obsolete methods.
- Methods are now asynchronous. (The return value changed from `void` to `Task` and gains `Async` suffix)
- Events are now asynchronous (return value changed from `void` to `Task`)
- `Add/RemoveChatCommandIdentifier` methods were removed, use `ChatCommandIdentifiers` property instead (same applies to whisper) and uses `string` instead of `char`
- `OnLog` event was removed (you can still use `ILoggerFactory` to get logs)
- removed builders classes (removed `TwitchLib.Client.Models.Builders namespace`)
- changed public fields to properties
- rewritten all models in `TwitchLib.Client.Models`
- some props/classes can be slightly renamed
- some properties (`IsModerator`, `IsSubscriber`, `HasTurbo`, `IsVip`, `IsPartner`, `IsStaff`) moved to the `UserDetails` property

## Minimal Setup
Step 1: Create a new Console project

Step 2: Install the `TwitchLib.Client` NuGet package. (See above on how to do that)

Step 2.5: (Optional) Install the [`Microsoft.Extensions.Logging.Console`](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Console) NuGet package (or some other compatible logging provider) to see logs.

Step 3: Add the following code to your `Program.cs` file:
```cs
using Microsoft.Extensions.Logging;
using TwitchLib.Client;
using TwitchLib.Client.Events;
using TwitchLib.Client.Models;

// Optional logger
var loggerFactory = LoggerFactory.Create(c => c
.AddConsole()
// .SetMinimumLevel(LogLevel.Trace) // uncomment to view raw messages received from twitch
);

var credentials = new ConnectionCredentials(); // anonymous user, add Username and OAuth token to get the ability to send messages
var client = new TwitchClient(loggerFactory: loggerFactory);

client.Initialize(credentials);
client.OnConnected += Client_OnConnected;
client.OnJoinedChannel += Client_OnJoinedChannel;
client.OnMessageReceived += Client_OnMessageReceived;

await client.ConnectAsync();
await Task.Delay(Timeout.Infinite);


async Task Client_OnConnected(object? sender, OnConnectedEventArgs e)
{
await client.JoinChannelAsync("channel_name"); // replace with the channel you want to join
}

async Task Client_OnJoinedChannel(object? sender, OnJoinedChannelArgs e)
{
Console.WriteLine($"Connected to {e.Channel}");
await client.SendMessageAsync(e.Channel, "Hey guys! I am a bot connected via TwitchLib!");
}

async Task Client_OnMessageReceived(object? sender, OnMessageReceivedArgs e)
{
Console.WriteLine($"{e.ChatMessage.Username}#{e.ChatMessage.Channel}: {e.ChatMessage.Message}");
}
```
Step 4: Change the `channel_name` in the `Client_OnConnected` method to the name of the channel you want to join and run the application.

More complete examples can be found in the [TwitchLib.Client.Example](/TwitchLib.Client.Example/)
22 changes: 22 additions & 0 deletions TwitchLib.Client.Benchmark/ChatMessage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using BenchmarkDotNet.Attributes;
using TwitchLib.Client.Parsing;
using TwitchLib.Client.Models;
using TwitchLib.Client.Models.Internal;

namespace TwitchLib.Client.Benchmark
{
[ShortRunJob, MemoryDiagnoser]
public class ChatMessageBenchmark
{
private static readonly IrcMessage Message = IrcParser.ParseMessage(
"@badge-info=subscriber/22;badges=subscriber/3012;color=#FFFF00;display-name=FELYP8;emote-only=1;emotes=521050:0-6,8-14,16-22,24-30,32-38,40-46,48-54,56-62,64-70,72-78,80-86,88-94,96-102,104-110,148-154,156-162,164-170,172-178,180-186,188-194,196-202,204-210,212-218,220-226,228-234,236-242,244-250,252-258,260-266/302827730:112-119/302827734:121-128/302827735:130-137/302827737:139-146;first-msg=0;flags=;id=1844235a-c24e-4e18-937b-805d6601aebe;mod=0;returning-chatter=0;room-id=22484632;subscriber=1;tmi-sent-ts=1685664001040;turbo=0;user-id=162760707;user-type= :felyp8!felyp8@felyp8.tmi.twitch.tv PRIVMSG #forsen :forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE1 forsenE2 forsenE3 forsenE4 forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE");

private readonly MessageEmoteCollection ChannelEmotes = new();

[Benchmark]
public ChatMessage ClientScenarioCreate()
{
return new("test_name", Message, ChannelEmotes);
}
}
}
18 changes: 18 additions & 0 deletions TwitchLib.Client.Benchmark/IrcMessageHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using BenchmarkDotNet.Attributes;
using TwitchLib.Client.Parsing;

namespace TwitchLib.Client.Benchmark
{
[MemoryDiagnoser]
public class IrcMessageHandlerBenchmark
{
[Benchmark]
public bool ParseAndCheckFailedAuth()
{
return IrcParser
.ParseMessage(@"@badges=subscriber/0;color=#0000FF;display-name=KittyJinxu;emotes=30259:0-6;id=1154b7c0-8923-464e-a66b-3ef55b1d4e50;login=kittyjinxu;mod=0;msg-id=ritual;msg-param-ritual-name=new_chatter;room-id=35740817;subscriber=1;system-msg=@KittyJinxu\sis\snew\shere.\sSay\shello!;tmi-sent-ts=1514387871555;turbo=0;user-id=187446639;user-type= USERNOTICE #thorlar kittyjinxu > #thorlar: HeyGuys")
.ToString()
.StartsWith(":tmi.twitch.tv NOTICE * :Login authentication failed");
}
}
}
23 changes: 23 additions & 0 deletions TwitchLib.Client.Benchmark/IrcParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using BenchmarkDotNet.Attributes;
using TwitchLib.Client.Parsing;
using TwitchLib.Client.Models.Internal;

namespace TwitchLib.Client.Benchmark
{
[MemoryDiagnoser]
public class IrcParserBenchmark
{
[Params(
"@msg-id=host_on :tmi.twitch.tv NOTICE #burkeblack :Now hosting DjTechlive.",
":blubott.tmi.twitch.tv 366 blubott #monstercat :End of /NAMES list",
":jtv!jtv@jtv.tmi.twitch.tv PRIVMSG (HOSTED):(HOSTER) is now hosting you for (VIEWERS_TOTAL) viewers.",
"@msg-id=raid_notice_mature :tmi.twitch.tv NOTICE #swiftyspiffy :This channel is intended for mature audiences.",
@"@badges=subscriber/0;color=#0000FF;display-name=KittyJinxu;emotes=30259:0-6;id=1154b7c0-8923-464e-a66b-3ef55b1d4e50;login=kittyjinxu;mod=0;msg-id=ritual;msg-param-ritual-name=new_chatter;room-id=35740817;subscriber=1;system-msg=@KittyJinxu\sis\snew\shere.\sSay\shello!;tmi-sent-ts=1514387871555;turbo=0;user-id=187446639;user-type= USERNOTICE #thorlar kittyjinxu > #thorlar: HeyGuys",
"@badge-info=subscriber/22;badges=subscriber/3012;color=#FFFF00;display-name=FELYP8;emote-only=1;emotes=521050:0-6,8-14,16-22,24-30,32-38,40-46,48-54,56-62,64-70,72-78,80-86,88-94,96-102,104-110,148-154,156-162,164-170,172-178,180-186,188-194,196-202,204-210,212-218,220-226,228-234,236-242,244-250,252-258,260-266/302827730:112-119/302827734:121-128/302827735:130-137/302827737:139-146;first-msg=0;flags=;id=1844235a-c24e-4e18-937b-805d6601aebe;mod=0;returning-chatter=0;room-id=22484632;subscriber=1;tmi-sent-ts=1685664001040;turbo=0;user-id=162760707;user-type= :felyp8!felyp8@felyp8.tmi.twitch.tv PRIVMSG #forsen :forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE1 forsenE2 forsenE3 forsenE4 forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE forsenE"
)]
public string? Message;

[Benchmark]
public IrcMessage Parse() => IrcParser.ParseMessage(Message!);
}
}
5 changes: 5 additions & 0 deletions TwitchLib.Client.Benchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using BenchmarkDotNet.Running;

BenchmarkSwitcher
.FromAssembly(typeof(Program).Assembly)
.Run(args);
18 changes: 18 additions & 0 deletions TwitchLib.Client.Benchmark/TwitchLib.Client.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<WarningsAsErrors>nullable</WarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.15.6" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TwitchLib.Client\TwitchLib.Client.csproj" />
</ItemGroup>

</Project>
37 changes: 0 additions & 37 deletions TwitchLib.Client.Enums/ChatColorPresets.cs

This file was deleted.

19 changes: 0 additions & 19 deletions TwitchLib.Client.Enums/CommercialLength.cs

This file was deleted.

Loading
Loading