feat: Add channel notification event tracking.
Bumps schema version to 2. Adds Profiles module version dep on schema init. Add notice_events, notice_sub_events, and notice_resub_events tables. Add corresponding event manager. Add ChatNotificationWithPayload event payload extension. Add ChannelNotification subscription.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import twitchio
|
||||
|
||||
|
||||
class ChatNotificationWithPayload(twitchio.ChatNotification):
|
||||
"""
|
||||
Extends twitchio.ChatNotification to include a _raw field with the original data.
|
||||
|
||||
The subclass registry in twitchio.BaseEvent should automatically register this as the correct event handler.
|
||||
"""
|
||||
|
||||
__slots__ = ("_raw",)
|
||||
|
||||
def __init__(self, payload: twitchio.ChannelChatNotificationEvent, *args, **kwargs):
|
||||
super().__init__(payload, *args, **kwargs)
|
||||
self._raw = payload
|
||||
Reference in New Issue
Block a user