Skip to content

Commit cfa7bbe

Browse files
committed
Fix potential missing emotes in resub
1 parent 2d7131d commit cfa7bbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twitchio/models/eventsub_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,7 @@ def __init__(self, payload: ChannelSubscribeMessageEvent, *, http: HTTPClient) -
18831883
self.cumulative_months: int = int(payload["cumulative_months"])
18841884
self.streak_months: int | None = int(payload["streak_months"]) if payload["streak_months"] is not None else None
18851885
self.text: str = payload["message"]["text"]
1886-
self.emotes: list[SubscribeEmote] = [SubscribeEmote(emote) for emote in payload["message"]["emotes"]]
1886+
self.emotes: list[SubscribeEmote] = [SubscribeEmote(emote) for emote in payload.get("message", {}).get("emotes", [])]
18871887

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

0 commit comments

Comments
 (0)