Skip to content

Commit

Permalink
🐛v0.1.3.1,添加简单错误处理
Browse files Browse the repository at this point in the history
  • Loading branch information
Asankilp committed Jul 11, 2024
1 parent ef22c1f commit 1e089ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions nonebot_plugin_acgnshow/acgnshower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from nonebot.adapters.onebot.v11 import MessageSegment
from nonebot.typing import T_State
from typing import Optional
from .acgnapis import *
Expand Down Expand Up @@ -37,11 +36,15 @@ async def find_show(
#await showcmd.send("日期:"+ date)
shows = get_shows_data(regionid,page=page,pagesize=config.acgnshow_pagesize)
# print(shows)
template = {
"shows":process_shows_data_to_template(shows),
"bgimage": choose_random_bgimage()
}
pic = await template_to_pic(RES_PATH,TEMPLATE_NAME,template)
try:
template = {
"shows":process_shows_data_to_template(shows),
"bgimage": choose_random_bgimage()
}
pic = await template_to_pic(RES_PATH,TEMPLATE_NAME,template)
except:
await UniMessage("发生错误").send()
return
# print(pic)
# a = Image.open(io.BytesIO(pic))
# a.save("template2pic.png", format="PNG")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "nonebot-plugin-acgnshow"
version = "0.1.3"
version = "0.1.3.1"
description = "Nonebot2插件,从哔哩哔哩会员购获取简易展览数据"
readme = "README.md"
requires-python = "<4.0,>=3.9"
Expand Down

0 comments on commit 1e089ba

Please sign in to comment.