From 0a3259184201f8de2e7ae99dd7a2133e50471ae9 Mon Sep 17 00:00:00 2001 From: Cassius0924 <2670226747@qq.com> Date: Sun, 4 Feb 2024 10:41:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A9=E6=B0=94=E9=A2=84=E6=8A=A5?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wechatter/config/parsers/weather_cron.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wechatter/config/parsers/weather_cron.py b/wechatter/config/parsers/weather_cron.py index ce7b7db..9b8e7c0 100644 --- a/wechatter/config/parsers/weather_cron.py +++ b/wechatter/config/parsers/weather_cron.py @@ -2,7 +2,7 @@ from apscheduler.triggers.cron import CronTrigger -from wechatter.commands._commands.weather import _generate_weather_message +from wechatter.commands._commands.weather import get_weather_str from wechatter.models.message import SendMessage, SendMessageType from wechatter.models.scheduler import CronTask from wechatter.sender import Sender @@ -39,7 +39,8 @@ def func(): to_persons = task["to_persons"] to_groups = task["to_groups"] send_message = SendMessage( - type=SendMessageType.TEXT, content=_generate_weather_message(task["city"]) + type=SendMessageType.TEXT, + content=get_weather_str(task["city"]), ) Sender.send_msg_ps(to_p_names=to_persons, message=send_message) Sender.send_msg_gs(to_g_names=to_groups, message=send_message)