From 9f7447b4f6f243fa40ebc6f9450fb160634b4ae9 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 15 May 2025 14:33:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95seht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/robot.py b/robot.py index ba681d6..3045219 100644 --- a/robot.py +++ b/robot.py @@ -410,6 +410,8 @@ class Robot(Job): self.config.reload() self.gbm.load_local_cache() await self.ipad_bot.send_text_message("filehelper", "已更新") + elif content == "PDF": + self.generate_sehuatang_pdf() if is_group: self.LOG.debug(f"入库和记录群消息: {message}") @@ -472,7 +474,7 @@ class Robot(Job): return for r in receivers: if self.gbm.get_group_permission(r, feature) == PermissionStatus.ENABLED: - await self.ipad_bot.send_image_message(r,path) + await self.ipad_bot.send_image_message(r, path) except Exception as e: self.LOG.error(f"send_group_file_message:{feature.description} error:{e}") @@ -484,7 +486,7 @@ class Robot(Job): current_hour = time.localtime().tm_hour current_minute = time.localtime().tm_min is_sleep_time = (current_hour == 0 and current_minute >= 30) or (1 <= current_hour < 5) - + if is_sleep_time: # 只处理特定消息,如管理员消息或紧急消息 self.LOG.info(f"夜间休眠时间(00:30-05:00),忽略消息: {msg}") @@ -667,6 +669,7 @@ class Robot(Job): self.send_group_file_message(path, Feature.PDF_CAPABILITY) except Exception as e: self.LOG.error(f"generateSehuatangPdf error:{e}") + def xiu_ren_download_task(self): try: # 每天下载10组图,然后发一个帖子PDF