pass ruff

This commit is contained in:
SengokuCola
2025-05-28 20:44:26 +08:00
parent bc489861d3
commit 218d0d4a5d
16 changed files with 45 additions and 63 deletions

View File

@@ -2,5 +2,6 @@
# 导入所有动作模块以确保装饰器被执行
from . import test_action # noqa
# from . import online_action # noqa
from . import mute_action # noqa

View File

@@ -57,14 +57,15 @@ class MuteAction(PluginAction):
# 确保duration是字符串类型
if int(duration) < 60:
duration = 60
if int(duration) > 3600*24*30:
duration = 3600*24*30
if int(duration) > 3600 * 24 * 30:
duration = 3600 * 24 * 30
duration_str = str(int(duration))
# 发送群聊禁言命令,按照新格式
await self.send_message(
type = "command", data = {"name": "GROUP_BAN", "args": {"qq_id": str(user_id), "duration": duration_str}},
display_message = f"我 禁言了 {target} {duration_str}"
type="command",
data={"name": "GROUP_BAN", "args": {"qq_id": str(user_id), "duration": duration_str}},
display_message=f"我 禁言了 {target} {duration_str}",
)
logger.info(f"{self.log_prefix} 成功发送禁言命令,用户 {target}({user_id}),时长 {duration}")