调整天气触发词

This commit is contained in:
liuwei
2025-05-20 15:41:29 +08:00
parent d22eecc28a
commit 6c8553e9b6
2 changed files with 3 additions and 5 deletions

View File

@@ -84,10 +84,11 @@ class WeatherPlugin(MessagePluginInterface):
roomid = message.get("roomid", "")
# 只处理群消息且包含"天气"的消息
if not roomid and not (content.startswith("天气") or content.endswith("天气")):
if not roomid:
return False
return True
command = content.split(" ")[0]
return command in self._commands
@plugin_stats_decorator(plugin_name="天气查询")
@plugin_points_cost(2, "天气查询消耗积分", Feature.WEATHER)