Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复发送问题 #649

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions GenshinUID/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,29 @@ async def to_msg(gsmsgs: List[GsMessage]):
)
)
elif _c.type == 'node':
await _send_node(
messages = [
to_json(
await to_msg(_c.data),
f'[CQ:image,file={_msg["data"]}]'
if _msg['type'] == 'image'
else _msg['data'],
'小助手',
str(2854196310),
)
)
for _msg in _c.data
if 'data' in _msg
]
await _send_node(messages)
elif _c.type == 'file':
await to_file(_c.data)
elif _c.type == 'at':
message.append(f'[CQ:at,qq={_c.data}]')
return message

result_msg = await to_msg(content)
if result_msg:
result_msg = ''.join(result_msg)
else:
return
if target_type == 'group':
await bot.send_group_msg(
self_id=bot_self_id,
Expand Down
Loading