Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复复读不能复读图片的问题 #573

Merged
merged 2 commits into from
May 24, 2022
Merged

修复复读不能复读图片的问题 #573

merged 2 commits into from
May 24, 2022

Conversation

jk6589jk
Copy link
Contributor

IMAGE_PATH = Path() / "resources" / "image"
TEMP_PATH = Path() / "resources" / "temp"
image()默认读取在resource/img目录下,读写路径不同,导致找不到图片
image(f"compare_{event.group_id}_img.jpg", "temp")读取的是resources/image/temp下的图片

打断打断施法!,rst.endswith("打断施法!")在复读内容含有图片时会报错

IMAGE_PATH = Path() / "resources" / "image"
TEMP_PATH = Path() / "resources" / "temp"
image()默认读取在 resource/img 目录下,读写路径不同,导致找不到图片

打断打断施法!,rst.endswith("打断施法!")在复读内容含有图片时会报错
@HibiKier
Copy link
Owner

TEMP_PATH 已经作为公共临时文件夹,修改方面不应该将TEMP_PATH改为IMAGE_PATH
应将
rst = msg + image(f"compare_{event.group_id}img.jpg", "temp")
改为
rst = msg + image(TEMP_PATH / f"compare
{event.group_id}_img.jpg")

@HibiKier HibiKier merged commit c63d4b8 into HibiKier:main May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants