调整天气触发词
This commit is contained in:
@@ -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