mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-29 00:32:06 +08:00
@@ -28,7 +28,10 @@ def image(
|
||||
if file.startswith(("http", "base64://")):
|
||||
return MessageSegment.image(file)
|
||||
else:
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user