Skip to content

Commit

Permalink
Add missing model sub_type
Browse files Browse the repository at this point in the history
  • Loading branch information
chillymosh committed Aug 24, 2024
1 parent d02af73 commit 52e5e36
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion twitchio/models/eventsub_.py
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,8 @@ def __repr__(self) -> str:


class GoalBegin(BaseEvent):
subscription_type = "channel.goal.begin"

__slots__ = ("id", "broadcaster", "type", "description", "current_amount", "target_amount", "started_at")

def __init__(self, payload: GoalBeginEvent, *, http: HTTPClient) -> None:
Expand All @@ -1392,6 +1394,8 @@ def __repr__(self) -> str:


class GoalProgress(BaseEvent):
subscription_type = "channel.goal.progress"

__slots__ = ("id", "broadcaster", "type", "description", "current_amount", "target_amount", "started_at")

def __init__(self, payload: GoalProgressEvent, *, http: HTTPClient) -> None:
Expand All @@ -1418,6 +1422,8 @@ def __repr__(self) -> str:


class GoalEnd(BaseEvent):
subscription_type = "channel.goal.end"

__slots__ = (
"id",
"broadcaster",
Expand Down Expand Up @@ -1452,7 +1458,7 @@ def __init__(self, payload: GoalEndEvent, *, http: HTTPClient) -> None:
self.achieved: bool = bool(payload["is_achieved"])

def __repr__(self) -> str:
return f"<GoalEnd id={self.id} broadcaster={self.broadcaster} type={self.type} started_at={self.started_at} ended_at={self.ended_at}>"
return f"<GoalEnd id={self.id} broadcaster={self.broadcaster} type={self.type} started_at={self.started_at} ended_at={self.ended_at} achieved={self.achieved}>"


class HypeTrainBegin(BaseEvent):
Expand Down

0 comments on commit 52e5e36

Please sign in to comment.