天气查询插件
This commit is contained in:
@@ -113,7 +113,6 @@ class WeatherPlugin(MessagePluginInterface):
|
||||
return True
|
||||
|
||||
@plugin_stats_decorator(plugin_name="天气查询")
|
||||
@plugin_points_cost(1, "天气查询消耗积分", Feature.UTILITY)
|
||||
async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]:
|
||||
"""处理消息"""
|
||||
content = str(message.get("content", "")).strip()
|
||||
@@ -124,7 +123,7 @@ class WeatherPlugin(MessagePluginInterface):
|
||||
bot: WechatAPIClient = message.get("bot")
|
||||
|
||||
# 检查权限
|
||||
if roomid and gbm.get_group_permission(roomid, Feature.UTILITY) == PermissionStatus.DISABLED:
|
||||
if roomid and gbm.get_group_permission(roomid, Feature.WEATHER) == PermissionStatus.DISABLED:
|
||||
return False, "没有权限"
|
||||
|
||||
# 处理消息内容
|
||||
|
||||
Reference in New Issue
Block a user