diff --git a/plugins/check_zhenxun_update/data_source.py b/plugins/check_zhenxun_update/data_source.py index 19a06055..ce02ac84 100755 --- a/plugins/check_zhenxun_update/data_source.py +++ b/plugins/check_zhenxun_update/data_source.py @@ -73,6 +73,7 @@ async def check_update(bot: Bot) -> 'int, str': message=f"检测真寻已更新,当前版本:{_version},最新版本:{latest_version}\n" f"开始更新.....", ) logger.info(f"开始下载真寻最新版文件....") + tar_gz_url = (await AsyncHttpx.get(tar_gz_url)).headers.get('Location') if await AsyncHttpx.download_file(tar_gz_url, zhenxun_latest_tar_gz): logger.info("下载真寻最新版文件完成....") error = await asyncio.get_event_loop().run_in_executor( diff --git a/plugins/poke/__init__.py b/plugins/poke/__init__.py index adf3cae0..0f5b5f88 100755 --- a/plugins/poke/__init__.py +++ b/plugins/poke/__init__.py @@ -64,8 +64,8 @@ async def _poke_event(event: PokeNotifyEvent): rand = random.random() if rand <= 0.3: path = random.choice(["luoli", "meitu"]) - index = random.randint(0, len(os.listdir(IMAGE_PATH / path))) - result = f"id:{index}" + image(f"{index}.jpg", path) + index = random.randint(0, len(os.listdir(IMAGE_PATH / "image_management" / path))) + result = f"id:{index}" + image(f"{index}.jpg", "image_management/" + path) await poke_.send(result) logger.info(f"USER {event.user_id} 戳了戳我 回复: {result} \n {result}") elif 0.3 < rand < 0.6: