mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-25 00:25:04 +08:00
⚡ 添加了外部资源热重载
This commit is contained in:
parent
ab9d3d3d3e
commit
bb331232ca
@ -73,9 +73,10 @@ async def template2image(
|
|||||||
template_path=template_path,
|
template_path=template_path,
|
||||||
**templates,
|
**templates,
|
||||||
)
|
)
|
||||||
async with aiofiles.open(os.path.join(template_path, f"debug-{random_hex_string(6)}.html"), "w", encoding="utf-8") as f:
|
random_file_name = f"debug-{random_hex_string(6)}.html"
|
||||||
|
async with aiofiles.open(os.path.join(template_path, random_file_name), "w", encoding="utf-8") as f:
|
||||||
await f.write(raw_html)
|
await f.write(raw_html)
|
||||||
nonebot.logger.info("Debug HTML: %s" % f"debug-{random_hex_string(6)}.html")
|
nonebot.logger.info("Debug HTML: %s" % f"{random_file_name}")
|
||||||
|
|
||||||
return await template_to_pic(
|
return await template_to_pic(
|
||||||
template_name=template_name,
|
template_name=template_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user