🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-06-25 15:15:27 +00:00
parent 9a10bac3a8
commit d566079185
4 changed files with 28 additions and 23 deletions

View File

@@ -115,7 +115,7 @@ class MuteAction(BaseAction):
if allowed_group == current_group_key:
logger.info(f"{self.log_prefix} 群组 {current_group_key} 有禁言动作权限")
return True, None
logger.warning(f"{self.log_prefix} 群组 {current_group_key} 没有禁言动作权限")
return False, "当前群组没有使用禁言动作的权限"
@@ -186,7 +186,7 @@ class MuteAction(BaseAction):
# 获取模板化消息
message = self._get_template_message(target, time_str, reason)
if not has_permission:
logger.warning(f"{self.log_prefix} 权限检查失败: {permission_error}")
result_status, result_message = await generator_api.rewrite_reply(
@@ -196,20 +196,18 @@ class MuteAction(BaseAction):
"reason": "表达自己没有在这个群禁言的能力",
},
)
if result_status:
for reply_seg in result_message:
data = reply_seg[1]
await self.send_text(data)
await self.store_action_info(
action_build_into_prompt=True,
action_prompt_display=f"尝试禁言了用户 {target},但是没有权限,无法禁言",
action_done=True,
)
# 不发送错误消息,静默拒绝
return False, permission_error