File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ Running Eventsub Inside a Commands Bot
7777
7878
7979 @esbot.event()
80- async def event_eventsub_notification_follow (payload: eventsub.ChannelFollowData) -> None:
80+ async def event_eventsub_notification_followV2 (payload: eventsub.ChannelFollowData) -> None:
8181 print('Received event!')
8282 channel = bot.get_channel('channel')
8383 await channel.send(f'{payload.data.user.name} followed woohoo!')
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def __init__(self):
1212 async def __ainit__ (self ) -> None :
1313 self .loop .create_task (esclient .listen (port = 4000 ))
1414 try :
15- await esclient .subscribe_channel_follows (broadcaster = channel_ID )
15+ await esclient .subscribe_channel_follows_v2 (broadcaster = channel_id , moderator = moderator_id )
1616 except twitchio .HTTPException :
1717 pass
1818
@@ -25,7 +25,7 @@ async def event_ready(self):
2525
2626
2727@esbot .event ()
28- async def event_eventsub_notification_follow (payload : eventsub .ChannelFollowData ) -> None :
28+ async def event_eventsub_notification_followV2 (payload : eventsub .ChannelFollowData ) -> None :
2929 print ("Received event!" )
3030 channel = bot .get_channel ("channel" )
3131 await channel .send (f"{ payload .data .user .name } followed woohoo!" )
You can’t perform that action at this time.
0 commit comments