From 3a70da8d7688805ebc57cad543dddf1a63f16de7 Mon Sep 17 00:00:00 2001 From: mzivv <984084954@qq.com> Date: Mon, 7 Nov 2022 18:47:31 +0800 Subject: [PATCH] add some notes Signed-off-by: mzivv <984084954@qq.com> --- main.py | 2 +- robot.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index b74e990..c8b23b6 100644 --- a/main.py +++ b/main.py @@ -40,7 +40,7 @@ def main(): robot.enableRecvMsg() # 每天7点发送天气预报 - robot.onEveryTime("00:30", weather_report, robot=robot) + robot.onEveryTime("07:00", weather_report, robot=robot) # 让机器人一直跑 robot.keepRunningAndBlockProcess() diff --git a/robot.py b/robot.py index eff455a..30738bf 100644 --- a/robot.py +++ b/robot.py @@ -131,6 +131,7 @@ class Robot(Job): ats = f" @{self.allContacts.get(wxid, '')}" self.LOG.info(f"To {receiver}: {msg}{ats}") + # {msg}{ats} 表示要发送的消息内容后面紧跟@,例如 北京天气情况为:xxx @张三,微信规定需这样写,否则@不生效 self.wcf.send_text(f"{msg}{ats}", receiver, at_list) def getAllContacts(self):