From 514208ab8f55e3d95be97930e4d6f5dffecde9e1 Mon Sep 17 00:00:00 2001 From: Ruoqi Yang Date: Sat, 15 Oct 2022 21:38:41 +0800 Subject: fix: twitter remove global get_bot --- ATRI/plugins/twitter/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ATRI/plugins/twitter/__init__.py b/ATRI/plugins/twitter/__init__.py index 66bde4f..35c07f7 100644 --- a/ATRI/plugins/twitter/__init__.py +++ b/ATRI/plugins/twitter/__init__.py @@ -150,9 +150,6 @@ class TwitterDynamicChecker(BaseTrigger): return now -_bot: Bot = get_bot() - - @scheduler.scheduled_job( AndTrigger([IntervalTrigger(seconds=30), TwitterDynamicChecker()]), name="推特动态更新检查", @@ -173,6 +170,7 @@ async def _check_td(): else: m: TwitterSubscription = tq.get_nowait() + _bot: Bot = get_bot() group_list = await _bot.get_group_list() gl = [f"{i['group_id']}" for i in group_list] if m.group_id not in gl: -- cgit v1.2.3