添加云盾
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-11-28 16:59:58 +08:00
parent 97658a6c56
commit 78bda5fc0a

View File

@ -6,6 +6,7 @@
import functools
from loguru import logger
from nonebot import on_message
from nonebot.rule import KeywordsRule, Rule, ToMeRule
from nonebot.adapters.onebot.v11.bot import Bot as OBBot
@ -16,6 +17,7 @@ from nonebot_plugin_alconna.uniseg.adapters.onebot11.builder import Onebot11Mess
from pypinyin import pinyin, Style as PinyinStyle
from konabot.common.longtask import DepLongTaskTarget
from konabot.common.apis.ali_content_safety import AlibabaGreen
keywords = ("szmtq", "tqszm", "提取首字母", "首字母提取", )
@ -62,5 +64,8 @@ async def _(target: DepLongTaskTarget, msg: UniMsg, evt: OBMessageEvent | None =
p[0] for p in result if len(p) > 0
], "")
if not await AlibabaGreen.detect(result_text):
logger.info(f"对首字母序列的检测未通过安全测试 RAW={texts} FORMATTED={result_text}")
await target.send_message(result_text, at=False)