mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
⚡️ 修改b站转发解析插件类型
This commit is contained in:
parent
3e29a5e3a3
commit
8470777f6c
@ -61,9 +61,6 @@ _blmt = BanCheckLimiter(
|
||||
malicious_ban_count,
|
||||
)
|
||||
|
||||
# TODO: 恶意出发命令检测过滤
|
||||
_ignore = ["parse_bilibili"]
|
||||
|
||||
|
||||
# 恶意触发命令检测
|
||||
@run_preprocessor
|
||||
@ -73,7 +70,7 @@ async def _(matcher: Matcher, bot: Bot, session: EventSession, state: T_State):
|
||||
module = plugin.module_name
|
||||
if metadata := plugin.metadata:
|
||||
extra = metadata.extra
|
||||
if extra.get("plugin_type") == PluginType.HIDDEN or module not in _ignore:
|
||||
if extra.get("plugin_type") == PluginType.HIDDEN:
|
||||
return
|
||||
user_id = session.id1
|
||||
group_id = session.id3 or session.id2
|
||||
|
||||
@ -172,9 +172,8 @@ async def _generate_card(
|
||||
uid_img = await BuildImage.build_text_image(
|
||||
f"UID: {uid}", size=30, font_color=(255, 255, 255)
|
||||
)
|
||||
bk.getsize("Accumulative check-in for")
|
||||
image1 = await bk.build_text_image("Accumulative check-in for", size=25)
|
||||
image2 = await bk.build_text_image("days", size=25)
|
||||
image1 = await bk.build_text_image("Accumulative check-in for", bk.font)
|
||||
image2 = await bk.build_text_image("days", bk.font)
|
||||
sign_day_img = await BuildImage.build_text_image(
|
||||
f"{user.sign_count}", size=40, font_color=(211, 64, 33)
|
||||
)
|
||||
|
||||
@ -12,6 +12,7 @@ from zhenxun.configs.path_config import TEMP_PATH
|
||||
from zhenxun.configs.utils import PluginExtraData, RegisterConfig, Task
|
||||
from zhenxun.models.task_info import TaskInfo
|
||||
from zhenxun.services.log import logger
|
||||
from zhenxun.utils.enum import PluginType
|
||||
from zhenxun.utils.http_utils import AsyncHttpx
|
||||
|
||||
from .information_container import InformationContainer
|
||||
@ -27,7 +28,7 @@ __plugin_meta__ = PluginMetadata(
|
||||
extra=PluginExtraData(
|
||||
author="leekooyo",
|
||||
version="0.1",
|
||||
menu_type="其他",
|
||||
plugin_type=PluginType.HIDDEN,
|
||||
configs=[
|
||||
RegisterConfig(
|
||||
module="_task",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user