Skip to content

Commit

Permalink
Fix potential missing emotes in resub
Browse files Browse the repository at this point in the history
  • Loading branch information
chillymosh committed Dec 1, 2024
1 parent 2d7131d commit cfa7bbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twitchio/models/eventsub_.py
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,7 @@ def __init__(self, payload: ChannelSubscribeMessageEvent, *, http: HTTPClient) -
self.cumulative_months: int = int(payload["cumulative_months"])
self.streak_months: int | None = int(payload["streak_months"]) if payload["streak_months"] is not None else None
self.text: str = payload["message"]["text"]
self.emotes: list[SubscribeEmote] = [SubscribeEmote(emote) for emote in payload["message"]["emotes"]]
self.emotes: list[SubscribeEmote] = [SubscribeEmote(emote) for emote in payload.get("message", {}).get("emotes", [])]

def __repr__(self) -> str:
return f"<ChannelSubscriptionMessage broadcaster={self.broadcaster} user={self.user} text={self.text}>"
Expand Down

0 comments on commit cfa7bbe

Please sign in to comment.