Skip to content

Commit

Permalink
修复模拟抽卡重试错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant1816 committed Dec 20, 2024
1 parent cfaff48 commit cea27b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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-pjsekaihelper"
version = "1.2.0"
version = "1.2.1"
description = "世界计划插件,拥有组建车队、生成角色表情包、模拟抽卡等功能,持续开发中"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
8 changes: 4 additions & 4 deletions src/nonebot_plugin_pjsekaihelper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
)
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit cea27b4

Please sign in to comment.