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)
|
_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)
|
_reply_str = await to_markdown(_reply)
|
||||||
_buttons: List[Button] = []
|
_buttons: List[Button] = []
|
||||||
for option in option_list:
|
for option in option_list:
|
||||||
|
@ -2,7 +2,7 @@ import uuid
|
|||||||
import random
|
import random
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from base64 import b64encode
|
from base64 import b64decode, b64encode
|
||||||
from typing import List, Tuple, Union, Literal, Optional
|
from typing import List, Tuple, Union, Literal, Optional
|
||||||
|
|
||||||
import msgspec
|
import msgspec
|
||||||
@ -152,7 +152,7 @@ async def convert_message(
|
|||||||
message = [message]
|
message = [message]
|
||||||
elif isinstance(message, str):
|
elif isinstance(message, str):
|
||||||
if message.startswith('base64://'):
|
if message.startswith('base64://'):
|
||||||
img = Image.open(message)
|
img = Image.open(BytesIO(b64decode(message[9:])))
|
||||||
message = [
|
message = [
|
||||||
MessageSegment.image(message),
|
MessageSegment.image(message),
|
||||||
MessageSegment.image_size(img.size),
|
MessageSegment.image_size(img.size),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user