适配 bind
Some checks failed
TypeCheck / TypeCheck (push) Has been cancelled

This commit is contained in:
2025-04-15 03:30:30 +08:00
parent f90be2ef9c
commit 86198df4ed
9 changed files with 36 additions and 14 deletions

View File

@@ -8,6 +8,7 @@ from nonebot_plugin_userinfo import BotUserInfo, EventUserInfo, UserInfo
from ...db import BindStatus, create_or_update_bind, trigger
from ...utils.host import HostPage, get_self_netloc
from ...utils.image import get_avatar
from ...utils.lang import get_lang
from ...utils.render import Bind, render
from ...utils.render.schemas.base import People
from ...utils.screenshot import screenshot
@@ -45,7 +46,7 @@ async def _(
'v1/binding',
Bind(
platform=GAME_TYPE,
status='unknown',
type='unknown',
user=People(
avatar=await get_avatar(event_user_info, 'Data URI', None), name=user_info.data.name
),
@@ -53,7 +54,8 @@ async def _(
avatar=await get_avatar(bot_info, 'Data URI', '../../static/logo/logo.svg'),
name=bot_info.user_remark or bot_info.user_displayname or bot_info.user_name,
),
command='茶服查我',
prompt='茶服查我',
_lang=get_lang(),
),
)
) as page_hash: