Skip to content

Commit f8ef873

Browse files
committed
Add more event docs
1 parent 1241da4 commit f8ef873

File tree

1 file changed

+216
-21
lines changed

1 file changed

+216
-21
lines changed

docs/references/events.rst

Lines changed: 216 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@ All events are prefixed with **event_**
2929
- :class:`~models.eventsub_.AutomodMessageUpdate`
3030
* - Automod Settings Update
3131
- :meth:`~eventsub.AutomodSettingsUpdateSubscription`
32-
- automod_settings_update
32+
- :func:`~twitchio.event_automod_settings_update()`
3333
- :class:`~models.eventsub_.AutomodSettingsUpdate`
3434
* - Automod Terms Update
3535
- :meth:`~eventsub.AutomodTermsUpdateSubscription`
36-
- automod_terms_update
36+
- :func:`~twitchio.event_automod_terms_update()`
3737
- :class:`~models.eventsub_.AutomodTermsUpdate`
3838
* - Channel Update
3939
- :meth:`~eventsub.ChannelUpdateSubscription`
40-
- channel_update
40+
- :func:`~twitchio.event_channel_update()`
4141
- :class:`~models.eventsub_.ChannelUpdate`
4242
* - Channel Follow
4343
- :meth:`~eventsub.ChannelFollowSubscription`
44-
- follow
44+
- :func:`~twitchio.event_follow()`
4545
- :class:`~models.eventsub_.ChannelFollow`
4646
* - Channel Ad Break Begin
4747
- :meth:`~eventsub.AdBreakBeginSubscription`
48-
- ad_break
48+
- :func:`~twitchio.event_ad_break()`
4949
- :class:`~models.eventsub_.ChannelAdBreakBegin`
5050
* - Channel Chat Clear
5151
- :meth:`~eventsub.ChatClearSubscription`
52-
- chat_clear
52+
- :func:`~twitchio.event_chat_clear()`
5353
- :class:`~models.eventsub_.ChannelChatClear`
5454
* - Channel Chat Clear User Messages
5555
- :meth:`~eventsub.ChatClearUserMessagesSubscription`
56-
- chat_clear_user
56+
- :func:`~twitchio.event_chat_clear_user()`
5757
- :class:`~models.eventsub_.ChannelChatClearUserMessages`
5858
* - Channel Chat Message
5959
- :meth:`~eventsub.ChatMessageSubscription`
60-
- message
60+
- :func:`~twitchio.event_message()`
6161
- :class:`~models.eventsub_.ChatMessage`
6262
* - Channel Chat Message Delete
6363
- :meth:`~eventsub.ChatMessageDeleteSubscription`
64-
- message_delete
64+
- :func:`~twitchio.event_message_delete()`
6565
- :class:`~models.eventsub_.ChatMessageDelete`
6666
* - Channel Chat Notification
6767
- :meth:`~eventsub.ChatNotificationSubscription`
@@ -273,11 +273,11 @@ All events are prefixed with **event_**
273273
- :class:`~models.eventsub_.ShieldModeEnd`
274274
* - Shoutout Create
275275
- :meth:`~eventsub.ShoutoutCreateSubscription`
276-
- shoutout_create
276+
- :func:`~twitchio.event_shoutout_create()`
277277
- :class:`~models.eventsub_.ShoutoutCreate`
278278
* - Shoutout Received
279279
- :meth:`~eventsub.ShoutoutReceiveSubscription`
280-
- shoutout_receive
280+
- :func:`~twitchio.event_shoutout_receive()`
281281
- :class:`~models.eventsub_.ShoutoutReceive`
282282
* - Stream Online
283283
- :meth:`~eventsub.StreamOnlineSubscription`
@@ -289,19 +289,19 @@ All events are prefixed with **event_**
289289
- :class:`~models.eventsub_.StreamOffline`
290290
* - User Authorization Grant
291291
- :meth:`~eventsub.UserAuthorizationGrantSubscription`
292-
- user_authorization_grant
292+
- :func:`~twitchio.event_user_authorization_grant()`
293293
- :class:`~models.eventsub_.UserAuthorizationGrant`
294294
* - User Authorization Revoke
295295
- :meth:`~eventsub.UserAuthorizationRevokeSubscription`
296-
- user_authorization_revoke
296+
- :func:`~twitchio.event_user_authorization_revoke()`
297297
- :class:`~models.eventsub_.UserAuthorizationRevoke`
298298
* - User Update
299299
- :meth:`~eventsub.UserUpdateSubscription`
300-
- user_update
300+
- :func:`~twitchio.event_user_update()`
301301
- :class:`~models.eventsub_.UserUpdate`
302302
* - Whisper Received
303303
- :meth:`~eventsub.WhisperReceivedSubscription`
304-
- message_whisper
304+
- :func:`~twitchio.event_message_whisper()`
305305
- :class:`~models.eventsub_.Whisper`
306306

307307

@@ -371,7 +371,7 @@ Automod
371371
:es-docs:`Automod Message Hold V2 <automodmessagehold-v2>`.
372372

373373
You must subscribe to EventSub with :class:`~twitchio.eventsub.AutomodMessageHoldSubscription` or
374-
:class:`~twitchio.eventsub.AutomodMessageHoldV2Subscription` for each required stream to receive this event.
374+
:class:`~twitchio.eventsub.AutomodMessageHoldV2Subscription` for each required broadcaster to receive this event.
375375

376376
:param twitchio.AutomodMessageHold payload: The EventSub payload received for this event.
377377

@@ -384,10 +384,122 @@ Automod
384384
:es-docs:`Automod Message Update V2 <automodmessageupdate-v2>`.
385385

386386
You must subscribe to EventSub with :class:`~twitchio.eventsub.AutomodMessageUpdateSubscription` or
387-
:class:`~twitchio.eventsub.AutomodMessageUpdateV2Subscription` for each required stream to receive this event.
387+
:class:`~twitchio.eventsub.AutomodMessageUpdateV2Subscription` for each required broadcaster to receive this event.
388388

389389
:param twitchio.AutomodMessageUpdate payload: The EventSub payload received for this event.
390390

391+
.. py:function:: event_automod_settings_update(payload: twitchio.AutomodSettingsUpdate) -> None
392+
:async:
393+
394+
Event dispatched when a broadcaster's automod settings are updated.
395+
396+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Automod Settings Update <automodsettingsupdate>`
397+
398+
You must subscribe to EventSub with :class:`~twitchio.eventsub.AutomodSettingsUpdateSubscription`
399+
for each required broadcaster to receive this event.
400+
401+
:param twitchio.AutomodSettingsUpdate payload: The EventSub payload received for this event.
402+
403+
.. py:function:: event_automod_terms_update(payload: twitchio.AutomodTermsUpdate) -> None
404+
:async:
405+
406+
Event dispatched when a broadcaster's automod terms are updated. Changes to private terms are not sent.
407+
408+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Automod Terms Update <automodtermsupdate>`
409+
410+
You must subscribe to EventSub with :class:`~twitchio.eventsub.AutomodTermsUpdateSubscription`
411+
for each required broadcaster to receive this event.
412+
413+
:param twitchio.AutomodTermsUpdate payload: The EventSub payload received for this event.
414+
415+
416+
Channel / Broadcaster
417+
---------------------
418+
419+
.. py:function:: event_channel_update(payload: twitchio.ChannelUpdate) -> None
420+
:async:
421+
422+
Event dispatched when a broadcaster updates their channel properties e.g. category, title, content classification labels, broadcast, or language.
423+
424+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Channel Update <channelupdate>`
425+
426+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ChannelUpdateSubscription`
427+
for each required broadcaster to receive this event.
428+
429+
:param twitchio.ChannelUpdate payload: The EventSub payload received for this event.
430+
431+
.. py:function:: event_follow(payload: twitchio.ChannelFollow) -> None
432+
:async:
433+
434+
Event dispatched when someone follows a channel.
435+
436+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Channel Follow <channelfollow>`
437+
438+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ChannelFollowSubscription`
439+
for each required broadcaster to receive this event.
440+
441+
:param twitchio.ChannelFollow payload: The EventSub payload received for this event.
442+
443+
.. py:function:: event_ad_break(payload: twitchio.ChannelAdBreakBegin) -> None
444+
:async:
445+
446+
Event dispatched when a midroll commercial break has started running.
447+
448+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Channel Ad Break Begin <channelad_breakbegin>`
449+
450+
You must subscribe to EventSub with :class:`~twitchio.eventsub.AdBreakBeginSubscription`
451+
for each required broadcaster to receive this event.
452+
453+
:param twitchio.ChannelAdBreakBegin payload: The EventSub payload received for this event.
454+
455+
.. py:function:: event_chat_clear(payload: twitchio.ChannelChatClear) -> None
456+
:async:
457+
458+
Event dispatched when a moderator or bot has cleared all messages from the chat room.
459+
460+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Channel Chat Clear <channelchatclear>`
461+
462+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ChatClearSubscription`
463+
for each required broadcaster to receive this event.
464+
465+
:param twitchio.ChannelChatClear payload: The EventSub payload received for this event.
466+
467+
.. py:function:: event_chat_clear_user(payload: twitchio.ChannelChatClearUserMessages) -> None
468+
:async:
469+
470+
Event dispatched when a moderator or bot has cleared all messages from a specific user.
471+
472+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Channel Chat Clear User Messages <channelchatclear_user_messages>`
473+
474+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ChatClearUserMessagesSubscription`
475+
for each required broadcaster to receive this event.
476+
477+
:param twitchio.ChannelChatClearUserMessages payload: The EventSub payload received for this event.
478+
479+
.. py:function:: event_message(payload: twitchio.ChatMessage) -> None
480+
:async:
481+
482+
Event dispatched when a user sends a message to a chat room.
483+
484+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Channel Chat Message <channelchatmessage>`
485+
486+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ChatMessageSubscription`
487+
for each required broadcaster to receive this event.
488+
489+
:param twitchio.ChatMessage payload: The EventSub payload received for this event.
490+
491+
.. py:function:: event_message_delete(payload: twitchio.ChatMessageDelete) -> None
492+
:async:
493+
494+
Event dispatched when a moderator has removed a specific message.
495+
496+
Corresponds to the Twitch EventSub subscriptions :es-docs:`Channel Chat Message Delete <channelchatmessage_delete>`
497+
498+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ChatMessageDeleteSubscription`
499+
for each required broadcaster to receive this event.
500+
501+
:param twitchio.ChatMessageDelete payload: The EventSub payload received for this event.
502+
391503
Streams
392504
-------
393505

@@ -398,10 +510,10 @@ Streams
398510

399511
Corresponds to the Twitch EventSub subscription :es-docs:`Stream Online <streamonline>`.
400512

401-
You must subscribe to EventSub with :class:`~twitchio.eventsub.StreamOnlineSubscription` for each required stream
513+
You must subscribe to EventSub with :class:`~twitchio.eventsub.StreamOnlineSubscription` for each required broadcaster
402514
to receive this event.
403515

404-
:param twitchio.StreamOnline payload: The Stream Online payload for this event.
516+
:param twitchio.StreamOnline payload: The EventSub payload for this event.
405517

406518
.. py:function:: event_stream_offline(payload: twitchio.StreamOffline) -> None
407519
:async:
@@ -410,10 +522,93 @@ Streams
410522

411523
Corresponds to the Twitch EventSub subscription :es-docs:`Stream Offline <streamoffline>`.
412524

413-
You must subscribe to EventSub with :class:`~twitchio.eventsub.StreamOfflineSubscription` for each required stream
525+
You must subscribe to EventSub with :class:`~twitchio.eventsub.StreamOfflineSubscription` for each required broadcaster
526+
to receive this event.
527+
528+
:param twitchio.StreamOffline payload: The EventSub payload for this event.
529+
530+
531+
Shoutouts
532+
---------
533+
534+
.. py:function:: event_shoutout_create(payload: twitchio.ShoutoutCreate) -> None
535+
:async:
536+
537+
Event dispatched when when the specified broadcaster sends a shoutout.
538+
539+
Corresponds to the Twitch EventSub subscription :es-docs:`Shoutout Create <shoutoutcreate>`.
540+
541+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ShoutoutCreateSubscription` for each required broadcaster
542+
to receive this event to receive this event.
543+
544+
:param twitchio.ShoutoutCreate payload: The EventSub payload for this event.
545+
546+
.. py:function:: event_shoutout_receive(payload: twitchio.ShoutoutReceive) -> None
547+
:async:
548+
549+
Event dispatched when when the specified broadcaster receives a shoutout.
550+
551+
Corresponds to the Twitch EventSub subscription :es-docs:`Shoutout Create <shoutoutreceive>`.
552+
553+
You must subscribe to EventSub with :class:`~twitchio.eventsub.ShoutoutReceiveSubscription` for each required broadcaster
414554
to receive this event.
415555

416-
:param twitchio.StreamOffline payload: The Stream Offline payload for this event.
556+
:param twitchio.ShoutoutReceive payload: The EventSub payload for this event.
557+
558+
559+
OAuth
560+
-----
561+
562+
.. py:function:: event_user_authorization_grant(payload: twitchio.UserAuthorizationGrant) -> None
563+
:async:
564+
565+
Event dispatched when a user's authorization has been granted for your client id.
566+
567+
Corresponds to the Twitch EventSub subscription :es-docs:`User Authorization Grant <userauthorizationgrant>`.
568+
569+
You must subscribe to EventSub with :class:`~twitchio.eventsub.UserAuthorizationRevokeSubscription` to receive this event.
570+
571+
:param twitchio.UserAuthorizationGrant payload: The EventSub payload for this event.
572+
573+
.. py:function:: event_user_authorization_revoke(payload: twitchio.UserAuthorizationRevoke) -> None
574+
:async:
575+
576+
Event dispatched when a user's authorization has been revoked for your client id.
577+
578+
Corresponds to the Twitch EventSub subscription :es-docs:`User Authorization Revoke <userauthorizationrevoke>`.
579+
580+
You must subscribe to EventSub with :class:`~twitchio.eventsub.UserAuthorizationRevokeSubscription` to receive this event.
581+
582+
:param twitchio.UserAuthorizationRevoke payload: The EventSub payload for this event.
583+
584+
585+
User
586+
-----
587+
588+
.. py:function:: event_user_update(payload: twitchio.UserUpdate) -> None
589+
:async:
590+
591+
Event dispatched when a user has updated their account.
592+
593+
Corresponds to the Twitch EventSub subscription :es-docs:`User Update <userupdate>`.
594+
595+
You must subscribe to EventSub with :class:`~twitchio.eventsub.UserUpdateSubscription` for each required user
596+
to receive this event.
597+
598+
:param twitchio.UserUpdate payload: The EventSub payload for this event.
599+
600+
.. py:function:: event_message_whisper(payload: twitchio.Whisper) -> None
601+
:async:
602+
603+
Event dispatched when a user receives this a whisper.
604+
605+
Corresponds to the Twitch EventSub subscription :es-docs:`User Whisper <userwhispermessage>`.
606+
607+
You must subscribe to EventSub with :class:`~twitchio.eventsub.WhisperReceivedSubscription` for each required user
608+
to receive this event.
609+
610+
:param twitchio.Whisper payload: The EventSub payload for this event.
611+
417612

418613
Payloads
419614
~~~~~~~~

0 commit comments

Comments
 (0)