调整天气触发词
This commit is contained in:
@@ -4,9 +4,6 @@ command = ["天气"]
|
||||
command-format = """
|
||||
⚙️获取天气:
|
||||
天气 城市名
|
||||
天气城市名
|
||||
城市名天气
|
||||
城市名 天气
|
||||
"""
|
||||
# 和风天气API配置
|
||||
API_KEY= "32e692f94e364105808ea2c0302ef162" # 请填写您的和风天气API密钥
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user