mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Merge branch 'main' of https://github.com/HibiKier/zhenxun_bot
This commit is contained in:
commit
4e42f78bb0
@ -28,7 +28,10 @@ def image(
|
||||
if file.startswith(("http", "base64://")):
|
||||
return MessageSegment.image(file)
|
||||
else:
|
||||
return MessageSegment.image(IMAGE_PATH / file)
|
||||
if (IMAGE_PATH / file).exists():
|
||||
return MessageSegment.image(IMAGE_PATH / file)
|
||||
logger.warning(f"图片 {(IMAGE_PATH / file).absolute()}缺失...")
|
||||
return ""
|
||||
if isinstance(file, Path):
|
||||
if file.exists():
|
||||
return MessageSegment.image(file)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user