Skip to content

Commit bcb4439

Browse files
committed
Correct EventSub docs
Correct EventSub payload in docs
1 parent ca5fc04 commit bcb4439

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/exts/eventsub.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Running Eventsub Inside a Commands Bot
8080
async def event_eventsub_notification_follow(payload: eventsub.ChannelFollowData) -> None:
8181
print('Received event!')
8282
channel = bot.get_channel('channel')
83-
await channel.send(f'{payload.user.name} followed woohoo!')
83+
await channel.send(f'{payload.data.user.name} followed woohoo!')
8484
8585
bot.run()
8686

examples/eventsub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def event_ready(self):
2828
async def event_eventsub_notification_follow(payload: eventsub.ChannelFollowData) -> None:
2929
print("Received event!")
3030
channel = bot.get_channel("channel")
31-
await channel.send(f"{payload.user.name} followed woohoo!")
31+
await channel.send(f"{payload.data.user.name} followed woohoo!")
3232

3333

3434
bot.run()

0 commit comments

Comments
 (0)