Skip to content

Commit

Permalink
🐛 修复发送问题 (#649)
Browse files Browse the repository at this point in the history
修复发送问题
  • Loading branch information
RBAmeto authored Aug 23, 2024
1 parent cf54b6f commit b8c5eb7
Showing 1 changed file with 12 additions and 3 deletions.
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

0 comments on commit b8c5eb7

Please sign in to comment.