pass ruff
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
|
||||
# 导入所有动作模块以确保装饰器被执行
|
||||
from . import test_action # noqa
|
||||
|
||||
# from . import online_action # noqa
|
||||
from . import mute_action # noqa
|
||||
|
||||
@@ -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} 秒")
|
||||
|
||||
Reference in New Issue
Block a user