Skip to content

Commit 9c07abf

Browse files
committed
Update docs for new hypetrain method
Update docs for new hypetrain method
1 parent 4ad023d commit 9c07abf

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Master
66
- TwitchIO
77
- Additions
88
- Added optional ``started_at`` and ``ended_at`` arguments to :func:`~twitchio.PartialUser.fetch_clips`
9+
- Updated docstring regarding new HypeTrain contribution method ``OTHER`` for :attr:`~twitchio.HypeTrainContribution.type`
10+
- ext.eventsub
11+
- Additions
12+
- Updated docs regarding new HypeTrain contribution method ``other`` for :attr:`~twitchio.ext.eventsub.HypeTrainContributor.type`
913

1014
2.5.0
1115
======

twitchio/ext/eventsub/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ class HypeTrainContributor:
646646
user: :class:`twitchio.PartialUser`
647647
The user
648648
type: :class:`str`
649-
One of "bits" or "subscription". The way they contributed to the hype train
649+
One of "bits, "subscription" or "other". The way they contributed to the hype train
650650
total: :class:`int`
651651
How many points they've contributed to the Hype Train
652652
"""
@@ -655,7 +655,7 @@ class HypeTrainContributor:
655655

656656
def __init__(self, client: EventSubClient, data: dict):
657657
self.user = _transform_user(client, data, "user")
658-
self.type: Literal["bits", "subscription"] = data["type"] # one of bits, subscription
658+
self.type: Literal["bits", "subscription", "other"] = data["type"] # one of bits, subscription
659659
self.total: int = data["total"]
660660

661661

twitchio/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class HypeTrainContribution:
333333
If type is ``SUBS``, aggregate total where 500, 1000, or 2500 represent tier 1, 2, or 3 subscriptions respectively.
334334
For example, if top contributor has gifted a tier 1, 2, and 3 subscription, total would be 4000.
335335
type: :class:`str`
336-
Identifies the contribution method, either BITS or SUBS.
336+
Identifies the contribution method, either BITS, SUBS or OTHER.
337337
user: :class:`~twitchio.PartialUser`
338338
The user making the contribution.
339339
"""

0 commit comments

Comments
 (0)