From c0ae28143dfd67e7e056f0c649640b3663bff394 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 15 May 2025 14:06:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=A9=E6=B0=94=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/weather/main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/weather/main.py b/plugins/weather/main.py index fcd9631..a339454 100644 --- a/plugins/weather/main.py +++ b/plugins/weather/main.py @@ -148,13 +148,13 @@ class WeatherPlugin(MessagePluginInterface): elif content.endswith("天气"): # 格式: "北京天气" return content[:-2] - else: - # 尝试分离"天气"和城市名 - parts = content.split("天气") - if len(parts) == 2: - # 选择非空的部分作为城市名 - return parts[0] if parts[0] else parts[1] - + # else: + # # 尝试分离"天气"和城市名 + # parts = content.split("天气") + # if len(parts) == 2: + # # 选择非空的部分作为城市名 + # return parts[0] if parts[0] else parts[1] + # return "" async def _get_weather_info(self, city_name: str) -> str: