定时器在所有内容初始化完成之后再执行
This commit is contained in:
4
robot.py
4
robot.py
@@ -59,8 +59,6 @@ class Robot(Job):
|
|||||||
self.wcf = wcf
|
self.wcf = wcf
|
||||||
self.config = config
|
self.config = config
|
||||||
self.LOG = logging.getLogger("Robot")
|
self.LOG = logging.getLogger("Robot")
|
||||||
# 在初始化结束时注册所有被装饰的定时任务
|
|
||||||
register_scheduled_jobs(self)
|
|
||||||
|
|
||||||
self.wxid = self.wcf.get_self_wxid()
|
self.wxid = self.wcf.get_self_wxid()
|
||||||
self.allContacts = self.get_all_contacts()
|
self.allContacts = self.get_all_contacts()
|
||||||
@@ -116,6 +114,8 @@ class Robot(Job):
|
|||||||
# 加群测试
|
# 加群测试
|
||||||
self.group_add = GroupAdd(wcf, self.gbm)
|
self.group_add = GroupAdd(wcf, self.gbm)
|
||||||
|
|
||||||
|
# 在初始化结束时注册所有被装饰的定时任务
|
||||||
|
register_scheduled_jobs(self)
|
||||||
if ChatType.is_in_chat_types(chat_type):
|
if ChatType.is_in_chat_types(chat_type):
|
||||||
if chat_type == ChatType.TIGER_BOT.value and TigerBot.value_check(self.config.TIGERBOT):
|
if chat_type == ChatType.TIGER_BOT.value and TigerBot.value_check(self.config.TIGERBOT):
|
||||||
self.chat = TigerBot(self.config.TIGERBOT)
|
self.chat = TigerBot(self.config.TIGERBOT)
|
||||||
|
|||||||
Reference in New Issue
Block a user