fix:修复插件无法被关闭,新增新log浏览器
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
[plugin]
|
||||
name = "mute_plugin"
|
||||
version = "2.0.0"
|
||||
enabled = true
|
||||
enabled = false
|
||||
description = "群聊禁言管理插件,提供智能禁言功能"
|
||||
|
||||
# 组件启用控制
|
||||
[components]
|
||||
enable_smart_mute = true # 启用智能禁言Action
|
||||
enable_mute_command = false # 启用禁言命令Command
|
||||
enable_mute_command = true # 启用禁言命令Command
|
||||
|
||||
# 禁言配置
|
||||
[mute]
|
||||
|
||||
@@ -163,11 +163,25 @@ class MuteAction(BaseAction):
|
||||
success = await self.send_command(
|
||||
command_name="GROUP_BAN",
|
||||
args={"qq_id": str(user_id), "duration": str(duration_int)},
|
||||
display_message=f"禁言了 {target} {time_str}",
|
||||
display_message=f"发送禁言命令",
|
||||
)
|
||||
|
||||
if success:
|
||||
logger.info(f"{self.log_prefix} 成功发送禁言命令,用户 {target}({user_id}),时长 {duration_int} 秒")
|
||||
# 存储动作信息
|
||||
await self.api.store_action_info(
|
||||
action_build_into_prompt=True,
|
||||
action_prompt_display=f"尝试禁言了用户 {target},时长 {time_str},原因:{reason}",
|
||||
action_done=True,
|
||||
thinking_id=self.thinking_id,
|
||||
action_data={
|
||||
"target": target,
|
||||
"user_id": user_id,
|
||||
"duration": duration_int,
|
||||
"duration_str": time_str,
|
||||
"reason": reason
|
||||
}
|
||||
)
|
||||
return True, f"成功禁言 {target},时长 {time_str}"
|
||||
else:
|
||||
error_msg = "发送禁言命令失败"
|
||||
|
||||
Reference in New Issue
Block a user