mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-08 21:30:01 +08:00
fix🐛: 修改图片bytes发送
This commit is contained in:
@@ -79,7 +79,7 @@ async def _(session: EventSession):
|
||||
data_list.append([table["name"], table["desc"]])
|
||||
logger.info("查看数据库所有表", "查看所有表", session=session)
|
||||
table = await ImageTemplate.table_page("数据库表", "", column_name, data_list)
|
||||
await Image(table.pic2bs4()).send()
|
||||
await Image(table.pic2bytes()).send()
|
||||
except Exception as e:
|
||||
logger.error("获取表数据失败...", session=session, e=e)
|
||||
await Text(f"获取表数据失败... {type(e)}").send()
|
||||
|
||||
@@ -227,7 +227,7 @@ async def _(
|
||||
if not req_image_list:
|
||||
await Text("没有任何请求喔...").finish(reply=True)
|
||||
if len(req_image_list) == 1:
|
||||
await Image(req_image_list[0].pic2bs4()).finish()
|
||||
await Image(req_image_list[0].pic2bytes()).finish()
|
||||
width = sum([img.width for img in req_image_list])
|
||||
height = max([img.height for img in req_image_list])
|
||||
background = BuildImage(width, height)
|
||||
@@ -235,7 +235,7 @@ async def _(
|
||||
await req_image_list[1].line((0, 10, 1, req_image_list[1].height - 10), width=1)
|
||||
await background.paste(req_image_list[1], (req_image_list[1].width, 0))
|
||||
logger.info("查看请求", arparma.header_result, session=session)
|
||||
await Image(background.pic2bs4()).finish()
|
||||
await Image(background.pic2bytes()).finish()
|
||||
await Text("没有任何请求喔...").finish(reply=True)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user