mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-08 21:30:01 +08:00
fix: 修复之前更改正则引入的问题
This commit is contained in:
@@ -293,7 +293,7 @@ async def get__builder(event, _problem, answer, idx):
|
|||||||
if f"__placeholder_{rand}_{idx}.jpg" not in os.listdir(data_dir / f"{event.group_id}"):
|
if f"__placeholder_{rand}_{idx}.jpg" not in os.listdir(data_dir / f"{event.group_id}"):
|
||||||
break
|
break
|
||||||
rand = random.randint(1, 10000) + random.randint(1, 114514)
|
rand = random.randint(1, 10000) + random.randint(1, 114514)
|
||||||
strinfo = re.compile(f"\[CQ:image,file={r.group(1)},.*url={_x_list[0]}\?{_x_list[1]}.*\]")
|
strinfo = re.compile(f"\[CQ:image,file={r.group(1)},.*url={_x_list[0]}\?{_x_list[1]}.*?]")
|
||||||
answer = strinfo.sub(f"[__placeholder_{idx}]", answer)
|
answer = strinfo.sub(f"[__placeholder_{idx}]", answer)
|
||||||
await AsyncHttpx.download_file(
|
await AsyncHttpx.download_file(
|
||||||
img, data_dir / f"{event.group_id}" / f"__placeholder_{rand}_{idx}.jpg"
|
img, data_dir / f"{event.group_id}" / f"__placeholder_{rand}_{idx}.jpg"
|
||||||
|
|||||||
Reference in New Issue
Block a user