17 lines
522 B
Python
17 lines
522 B
Python
import twitchio
|
|
from twitchio.types_.eventsub import *
|
|
|
|
|
|
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: ChannelChatNotificationEvent, *args, **kwargs):
|
|
super().__init__(payload, *args, **kwargs)
|
|
self._raw = payload
|