Skip to content

Commit 702a0c3

Browse files
committed
Update eventsub example
1 parent 59d69fb commit 702a0c3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/exts/eventsub.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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!')

examples/eventsub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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!")

0 commit comments

Comments
 (0)