关闭功能与被动时不再区分大小写

This commit is contained in:
HibiKier
2022-10-07 22:07:36 +08:00
parent 3ee9ae5fb8
commit 43cddb3580
3 changed files with 18 additions and 4 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import io
from pathlib import Path
from typing import List, Union
@@ -26,7 +27,7 @@ def image(
return MessageSegment.image(file)
logger.warning(f"图片 {file.absolute()}缺失...")
return ""
elif isinstance(file, bytes):
elif isinstance(file, (bytes, io.BytesIO)):
return MessageSegment.image(file)
elif b64:
return MessageSegment.image(b64 if "base64://" in b64 else "base64://" + b64)