Skip to content

feat: Refactor EventSub for Hype Train V2 events #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jackmcguire1
Copy link
Contributor

Breaking

V1 of the following HypeTrain EventSub subscriptions have been deprecated and V2 subscription with different versions are now available for migration:

Existing structs have been refactored, as opposed to introducing new structs

2025‑06‑13

Feature

This pull request updates the eventsub.go file to introduce new fields and structures for handling hype train events in a more detailed manner, while also refining existing data types. The most significant changes include the addition of new fields to hype train event structures, the introduction of a new structure for shared train participants, and adjustments to data types for consistency.

Updates to hype train event structures:

  • Added new fields to EventSubHypeTrainBeginEvent, EventSubHypeTrainProgressEvent, and EventSubHypeTrainEndEvent to support version 2 of hype train notifications. These fields include ID, Level, Type, IsSharedTrain, and SharedTrainParticipants. Removed IsGoldenKappaTrain and LastContribution fields.

Introduction of shared train participant structure:

  • Added a new structure, EventSubSharedTrainParticipant, to define participants in shared hype trains, including broadcaster details (BroadcasterUserID, BroadcasterUserLogin, BroadcasterUserName).

Adjustments to data types:

  • Changed the Total field in EventSubContribution from int64 to int for consistency.
  • Added an Amount field to EventSubCharityAmount for additional granularity in charity-related data.- change fields to match hype train v2

- change fields to match hype train v2
@coveralls
Copy link

coveralls commented Jun 19, 2025

Pull Request Test Coverage Report for Build 15767428902

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.738%

Totals Coverage Status
Change from base Build 14026929583: 0.0%
Covered Lines: 1724
Relevant Lines: 1859

💛 - Coveralls

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.

3 participants