🎨 修改抽卡链接的发送方式

This commit is contained in:
Wuyi无疑 2023-04-22 00:33:45 +08:00
parent df72b97dc8
commit 0ad038538f
4 changed files with 11 additions and 20 deletions

View File

@ -13,7 +13,7 @@ repos:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.1.0
hooks:
- id: black

View File

@ -101,7 +101,7 @@ async def export_to_lelaer_gachalog(bot: Bot, ev: Event):
await bot.send(im)
@sv_export_gachalogurl.on_fullmatch(('导出抽卡记录链接'))
@sv_export_gachalogurl.on_fullmatch(('导出抽卡记录链接', '导出抽卡记录连接'))
async def export_gachalogurl(bot: Bot, ev: Event):
await bot.logger.info('开始执行[导出抽卡记录链接]')
sqla = get_sqla(ev.bot_id)
@ -109,4 +109,4 @@ async def export_gachalogurl(bot: Bot, ev: Event):
if uid is None:
return await bot.send(UID_HINT)
im = await get_gachaurl(uid)
await bot.send(im)
await bot.send(MessageSegment.node([MessageSegment.text(im)]))

View File

@ -16,12 +16,6 @@ from ..gsuid_utils.api.minigg.request import (
get_talent_info,
get_character_info,
)
from ..utils.image.image_tools import (
get_star_png,
get_simple_bg,
get_unknown_png,
draw_pic_with_ring,
)
from ..utils.fonts.genshin_fonts import (
gs_font_24,
gs_font_26,
@ -29,6 +23,12 @@ from ..utils.fonts.genshin_fonts import (
gs_font_36,
gs_font_44,
)
from ..utils.image.image_tools import (
get_star_png,
get_simple_bg,
get_unknown_png,
draw_pic_with_ring,
)
async def get_char_cost_wiki_img(name: str) -> Union[str, bytes]:
@ -95,15 +95,6 @@ async def draw_single_cost(title: str, data: Dict) -> Tuple[Image.Image, str]:
tent_y = 23
img.paste(cost_pic, (67 + tent_x + t, 61 + tent_y + y), cost_pic)
val = str(data[cost_name])
'''
img_draw.text(
(114 + tent_x + t, 45 + tent_y + y),
cost_pos,
white_color,
gs_font_20,
'mm',
)
'''
img_draw.text(
(114 + tent_x + t, 175 + tent_y + y),
val,

View File

@ -67,8 +67,8 @@ secondary = true
[tool.poetry.group.dev.dependencies]
flake8 = "^6.0.0"
black = "^22.12.0"
isort = "^5.11.5"
black = "^23.1.0"
isort = "^5.12.0"
pre-commit = "^2.21.0"
pycln = "^2.1.2"