fix:修改插件基类,现在支持任意类型发送

This commit is contained in:
SengokuCola
2025-05-23 10:53:18 +08:00
parent 7acee94ee4
commit 0eb1320481
5 changed files with 15 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
"""测试插件动作模块"""
# 导入所有动作模块以确保装饰器被执行
# from . import test_action # noqa
from . import test_action # noqa
# from . import online_action # noqa
# from . import mute_action # noqa
from . import online_action # noqa
from . import mute_action # noqa

View File

@@ -40,7 +40,11 @@ class MuteAction(PluginAction):
await self.send_message_by_expressor(f"我要禁言{target}{platform},时长{duration}秒,理由{reason},表达情绪")
try:
await self.send_message(f"[command]mute,{user_id},{duration}")
await self.send_message(
type = "text",
data = f"[command]mute,{user_id},{duration}",
# target = target
)
except Exception as e:
logger.error(f"{self.log_prefix} 执行mute动作时出错: {e}")

View File

@@ -17,7 +17,7 @@ class CheckOnlineAction(PluginAction):
"mode参数为version时查看在线版本状态默认用这种",
"mode参数为type时查看在线系统类型分布",
]
default = True # 不是默认动作,需要手动添加到使用集
default = False # 不是默认动作,需要手动添加到使用集
async def process(self) -> Tuple[bool, str]:
"""处理测试动作"""