直接使用 fstring 生成链接

This commit is contained in:
2024-06-10 02:35:07 +08:00
parent f9b11895e2
commit 92159e93b8
3 changed files with 3 additions and 8 deletions

View File

@@ -2,7 +2,6 @@ from asyncio import gather
from datetime import timedelta
from http import HTTPStatus
from typing import Literal, NamedTuple
from urllib.parse import urlunparse
from nonebot.adapters import Event
from nonebot.matcher import Matcher
@@ -230,7 +229,7 @@ async def make_query_image(user_info: UserInfoSuccess, game_data: GameData, even
),
)
) as page_hash:
return await screenshot(urlunparse(('http', get_self_netloc(), f'/host/{page_hash}.html', '', '', '')))
return await screenshot(f'http://{get_self_netloc()}/host/{page_hash}.html')
def make_query_text(user_info: UserInfoSuccess, game_data: GameData | None) -> UniMessage: