mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🐛 修复Bug
This commit is contained in:
parent
2c36ff7397
commit
f1c18bd62b
@ -123,7 +123,7 @@ class Bot:
|
||||
|
||||
_reply = await convert_message(reply)
|
||||
|
||||
if self.ev.real_bot_id in ['qqguild', 'qqgroup']:
|
||||
if self.ev.real_bot_id in ['qqgroup']:
|
||||
_reply_str = await to_markdown(_reply)
|
||||
_buttons: List[Button] = []
|
||||
for option in option_list:
|
||||
|
@ -2,7 +2,7 @@ import uuid
|
||||
import random
|
||||
from io import BytesIO
|
||||
from pathlib import Path
|
||||
from base64 import b64encode
|
||||
from base64 import b64decode, b64encode
|
||||
from typing import List, Tuple, Union, Literal, Optional
|
||||
|
||||
import msgspec
|
||||
@ -152,7 +152,7 @@ async def convert_message(
|
||||
message = [message]
|
||||
elif isinstance(message, str):
|
||||
if message.startswith('base64://'):
|
||||
img = Image.open(message)
|
||||
img = Image.open(BytesIO(b64decode(message[9:])))
|
||||
message = [
|
||||
MessageSegment.image(message),
|
||||
MessageSegment.image_size(img.size),
|
||||
|
Loading…
x
Reference in New Issue
Block a user