From b17f3ce06e119e033a52f2f1cf03179ae456c458 Mon Sep 17 00:00:00 2001 From: taizan-hokuto <55448286+taizan-hokuto@users.noreply.github.com> Date: Mon, 11 Nov 2019 22:52:28 +0900 Subject: [PATCH] Fix replaychat async startlisten --- pytchat/__init__.py | 2 ++ pytchat/core_async/replaychat.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pytchat/__init__.py b/pytchat/__init__.py index dbb580f..b1b49e1 100644 --- a/pytchat/__init__.py +++ b/pytchat/__init__.py @@ -13,6 +13,8 @@ __all__ = ["core_async","core_multithread","processors"] from .api import ( LiveChat, LiveChatAsync, + ReplayChat, + ReplayChatAsync, ChatProcessor, CompatibleProcessor, SimpleDisplayProcessor, diff --git a/pytchat/core_async/replaychat.py b/pytchat/core_async/replaychat.py index 55eafc9..07c02fd 100644 --- a/pytchat/core_async/replaychat.py +++ b/pytchat/core_async/replaychat.py @@ -122,7 +122,7 @@ class ReplayChatAsync: else: listen_task.add_done_callback(self._done_callback) - def _startlisten(self): + async def _startlisten(self): """最初のcontinuationパラメータを取得し、 _listenループのタスクを作成し開始する """ @@ -237,7 +237,7 @@ class ReplayChatAsync: data = self.processor.process(items) await callback(data) - def get(self): + async def get(self): """ bufferからデータを取り出し、processorに投げ、 加工済みのチャットデータを返す。