Skip to content

Creating a notification when a stream goes live #375

Answered by chillymosh
racaroni asked this question in Questions
Discussion options

You must be logged in to vote

Hi @racaroni,

We have an example of how to do this in our eventsub example.
https://twitchio.dev/en/latest/exts/eventsub.html#running-eventsub-inside-a-commands-bot

Be aware that this does currently require a publicly accessible URL, non self-signed SSL cert and a reverse proxy, such as NGINX.

You will just need to adjust the subscription method and callback event to the desired ones.

await esclient.subscribe_channel_stream_start(broadcaster=123456789)

@esbot.event()
async def event_eventsub_notification_stream_start(payload: eventsub.StreamOnlineData) -> None:
    channel_name =payload.data.broadcaster.name
    print(f"{channel_name } ONLINE")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@racaroni
Comment options

Answer selected by racaroni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants