Skip to content

Commit 43474b6

Browse files
authored
Add missing default_action (#489)
1 parent 613cba4 commit 43474b6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

twitchio/eventsub/subscriptions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,10 @@ def __init__(self, **condition: Unpack[Condition]) -> None:
11031103
def condition(self) -> Condition:
11041104
return {"broadcaster_user_id": self.broadcaster_user_id}
11051105

1106+
@property
1107+
def default_auth(self) -> DefaultAuthDict:
1108+
return {"as_bot": False, "token_for": self.broadcaster_user_id}
1109+
11061110

11071111
class ChannelSubscribeMessageSubscription(SubscriptionPayload):
11081112
"""The ``channel.subscription.message`` subscription type sends a notification when a user sends a resubscription chat message in a specific channel.
@@ -1138,6 +1142,10 @@ def __init__(self, **condition: Unpack[Condition]) -> None:
11381142
def condition(self) -> Condition:
11391143
return {"broadcaster_user_id": self.broadcaster_user_id}
11401144

1145+
@property
1146+
def default_auth(self) -> DefaultAuthDict:
1147+
return {"as_bot": False, "token_for": self.broadcaster_user_id}
1148+
11411149

11421150
class ChannelCheerSubscription(SubscriptionPayload):
11431151
"""The ``channel.cheer`` subscription type sends a notification when a user cheers on the specified channel.
@@ -1173,6 +1181,10 @@ def __init__(self, **condition: Unpack[Condition]) -> None:
11731181
def condition(self) -> Condition:
11741182
return {"broadcaster_user_id": self.broadcaster_user_id}
11751183

1184+
@property
1185+
def default_auth(self) -> DefaultAuthDict:
1186+
return {"as_bot": False, "token_for": self.broadcaster_user_id}
1187+
11761188

11771189
class ChannelRaidSubscription(SubscriptionPayload):
11781190
"""The ``channel.raid`` subscription type sends a notification when a broadcaster raids another broadcaster's channel.

0 commit comments

Comments
 (0)