Skip to content

Commit 1c7a29d

Browse files
committed
Add level attribute to hypetrain event
Add level attribute to HypeTrainBeginProgressData event
1 parent 307202c commit 1c7a29d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docs/changelog.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:orphan:
1+
:orphan:
22

33

44
Master
@@ -37,6 +37,7 @@ Master
3737
- Bug fixes
3838
- Unsubscribing from Pubsubevents works again
3939
- Fix a forgotten nonce in :func:`~twitchio.ext.pubsub.websocket._send_topics`
40+
- :class:`~twitchio.ext.pubsub.PubSubModerationActionChannelTerms` now uses the correct type data
4041

4142
- ext.sound
4243
- Bug fixes
@@ -51,14 +52,10 @@ Master
5152
- :func:`~twitchio.ext.eventsub.event_eventsub_notification_channel_goal_begin`
5253
- :func:`~twitchio.ext.eventsub.event_eventsub_notification_channel_goal_progress`
5354
- :func:`~twitchio.ext.eventsub.event_eventsub_notification_channel_goal_end`
55+
- HypeTrainBeginProgressData now has the :attr:`~twitchio.ext.eventsub.HypeTrainBeginProgressData.level`
5456

5557
- Bug fixes
5658
Correct typo in :class:`~twitchio.ext.eventsub.HypeTrainBeginProgressData` attribute :attr:`~twitchio.ext.eventsub.HypeTrainBeginProgressData.expires`
57-
58-
- ext.pubsub
59-
- Bug fixes
60-
- "type" of :class:`~twitchio.ext.pubsub.PubSubModerationActionChannelTerms` now uses the correct type data
61-
6259

6360
2.4.0
6461
======

twitchio/ext/eventsub/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@ class HypeTrainBeginProgressData(EventData):
657657
The top contributions of the Hype Train
658658
last_contribution: :class:`HypeTrainContributor`
659659
The last contributor to the Hype Train
660+
level: :class:`int`
661+
The current level of the Hype Train
660662
"""
661663

662664
__slots__ = (
@@ -668,6 +670,7 @@ class HypeTrainBeginProgressData(EventData):
668670
"last_contribution",
669671
"started",
670672
"expires",
673+
"level",
671674
)
672675

673676
def __init__(self, client: EventSubClient, data: dict):
@@ -679,6 +682,7 @@ def __init__(self, client: EventSubClient, data: dict):
679682
self.expires = _parse_datetime(data["expires_at"])
680683
self.top_contributions = [HypeTrainContributor(client, d) for d in data["top_contributions"]]
681684
self.last_contribution = HypeTrainContributor(client, data["last_contribution"])
685+
self.level: int = data["level"]
682686

683687

684688
class HypeTrainEndData(EventData):

0 commit comments

Comments
 (0)