From cea27b48ab82b6edade7d43f339711208965a773 Mon Sep 17 00:00:00 2001 From: Lyan Guan Date: Sat, 21 Dec 2024 00:27:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=A1=E6=8B=9F=E6=8A=BD?= =?UTF-8?q?=E5=8D=A1=E9=87=8D=E8=AF=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/nonebot_plugin_pjsekaihelper/__init__.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d24af21..d716622 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-plugin-pjsekaihelper" -version = "1.2.0" +version = "1.2.1" description = "世界计划插件,拥有组建车队、生成角色表情包、模拟抽卡等功能,持续开发中" readme = "README.md" requires-python = ">=3.9" diff --git a/src/nonebot_plugin_pjsekaihelper/__init__.py b/src/nonebot_plugin_pjsekaihelper/__init__.py index e7fd34d..8f209ef 100644 --- a/src/nonebot_plugin_pjsekaihelper/__init__.py +++ b/src/nonebot_plugin_pjsekaihelper/__init__.py @@ -40,7 +40,7 @@ homepage="https://github.com/Ant1816/nonebot-plugin-pjsekaihelper", extra={ "author": "Ant1", - "version": "1.2.0", + "version": "1.2.1", "priority": 10, }, ) @@ -220,17 +220,17 @@ async def handle_room_reset(bot: Bot, event: GroupMessageEvent): @gachasimulate.handle() async def handle_gacha(bot: Bot, event: GroupMessageEvent): url_tuple = generate_nums() + i = 0 while True: - i = 0 try: normalurl = url_tuple[0] after_training_url = url_tuple[1] break - except Exception: + except TypeError: i += 1 await gachasimulate.send(f"生成出现问题...重试中...{i}次") - generate_nums() + url_tuple = generate_nums() if after_training_url == '': await gachasimulate.send(MessageSegment.image(normalurl))