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: