Files
pytchat-fork/pytchat/processors/chat_processor.py
2019-12-20 21:33:32 +09:00

29 lines
807 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class ChatProcessor:
'''
Listenerからチャットデータactionsを受け取り
チャットデータを加工するクラスの抽象クラス
'''
def process(self, chat_components: list):
'''
チャットデータの加工を表すインターフェース。
LiveChatオブジェクトから呼び出される。
Parameter
----------
chat_components: List[component]
component : dict {
"video_id" : str
動画ID
"timeout" : int
次のチャットの再読み込みまでの時間(秒)
"chatdata" : List[dict]
チャットデータのリスト
}
'''
pass