Skip to content

[Release] v4.0.1#274

Merged
AoshiW merged 95 commits intomasterfrom
dev
Nov 21, 2025
Merged

[Release] v4.0.1#274
AoshiW merged 95 commits intomasterfrom
dev

Conversation

@AoshiW
Copy link
Copy Markdown
Contributor

@AoshiW AoshiW commented Nov 10, 2025

⚠ Breaking Changes in Version 4.0.1 ⚠

  • 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

Bukk94 and others added 30 commits April 18, 2023 22:07
* Migrate library to Communication v2.0

- Updated TwitchLib.Communication version to 2.0.0-preview-6cc076d87969e75c536fb86616f9cab9debfb44c
- Implemented Async overloads
- Fixed breaking changes from Communication project
- Removed some whisper-related code
- Small code formatting

* Updated project version from 3.4.0 to 4.0.0
* Reimplemented message throttling, added send options, abstracted event raising

* Reworked client in throttling service
Performance improvement/ deleted obsolete methods (v2)
The Twitch handshake on the reconnect was missing. Because of that, Twitch closed the connection to the client resulting in being unable to reconnect. Also the joining of the channels was missing.
Since the TwitchUsername (from the Credentials) isn't automatically joined, it doesn't need to check whether the channel is not the TwitchUsername.
Missing handshake and joining channel on reconnect fix
* ReplaceEmotes prefix and suffix addition
Motivation: We want to be able to differentiate between classic html addresses and emotes, which require further processing in FE

Changes:
TwitchClient, created public string variables : ReplacedEmotesPrefix, ReplacedEmotesSuffix
ChatMessage, added arguments: prefix, suffix
MessageEmotes, merged GetReplacementString and ReplaceEmotes to expose capability to change string using arguments

* Async Task Events

NEEDS: Async Event Handler and its implementation in my last update of
TwitchLib.Communication

Implements AsyncEventHandler
Makes asynchronization of most events in client

* Cleanup and nesting removal

* Initialize and SendTwitchMessage changes reverted
Removed unneeded awaiter in SendMessage
Created alternative solution to SendMessageAsync
Added TODO: SendMessageAsync should be deprecated

* Removed SendMessageAsync

---------

Co-authored-by: Gimli_CZ <Diggy.Diggy@hole.com>
…issues (#230)

* Rewrite IRC msg parser and other fixes:
- Add allocation-free split helpers
- Rewrite and simplify IRC message parser
- Fix minor warnings
- Avoid re-constructing parsed IrcMessage back into its raw format by the message handler (work-in-progress)
- Add benchmark project
- Specify strict level of language features validation to raise warnings on unsound/unstable use of newer language features on older targets

* clean-up, formatting and precondition benchmark

* fix comment

* fix formatting 2

* adjust bench, remove unncessary comment

* Make InitializeHelper sync again
* fix #215
fix name in check-buildstatus.ym
expose private (chat/whisper)CommandIdentifiers instead of methods

* fix name in .yml

* fix `ColorTranslator`

* Add default CommandIdentifier if not set
* TwitchClient cleanup:
- Rewrite HandleIrcMessageAsync to use switch expression and forward the task
- Simplify and clean up HandlePrivMsg
- Rewrite HandleNotice to use switch expression and forward the task
- Fix a bug in HandleNotice where UnaccountedFor fallback was called even when OnUnaccountedFor event had a handler
- Fix comment on IrcMessage ctor

* Fix login error conditional

* Fix MessageEmoteCollection and IrcParser:
- Fix bug in MesageEmoteCollection.Add which was indefinitely pattern + emoteText concatenating replacement regex until running out of maximum string length and crashing application
- Don't use SortedList, use Dictionary which is the correct container for keyed access
- Fix missed slicing in IrcParser to remove '@' at the start of tag sequence
- Fallback to unaccounted for on failed login if no failed login handler is registered
- Minor style cleanup

* Address feedback: don't raise unaccounted for ignored notices

* Revert the change for failed login, clean up event handling code and reduce async overhead

* Revert OnExistingUsersDetectedArgs change and finish TwitchClient cleanup

* Fix missed TryInvoke

---------

Co-authored-by: neon-sunset <neon-sunset@users.noreply.github.com>
faster/efficient `EmoteExtractor` and `Helpers`
- Fixesperf regression vs master by no longer having to dispatch running their handlers via Task.Run (it's partially my fault though)
- Adds corresponding rich event args
Syzuna and others added 28 commits January 3, 2024 14:54
…e size of the object (#262)

Co-authored-by: AoshiW <ondrula98@gmail.com>
* Updated ConnectionCredentials so a username is optional.

If no username is provided to the ConnectionCredentials, a default username of `justinfan` right-padded with 4-5 random digits will be generated.

* Updated call to Random to provide a min value

Co-authored-by: AoshiW <48525283+AoshiW@users.noreply.github.com>
Improves the EmoteExtractor test to confirm the Index is as expected also
fix disconnect event type in TwitchClient
* GiftedSubscription: add MsgParamOriginId support for tracking messages related to bulk sub gifting
* Update README and Example

---------

Co-authored-by: AoshiW <ondru@LAPTOP-7K2AEST8>
@AoshiW AoshiW merged commit 1432163 into master Nov 21, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants