Skip to content

Commit

Permalink
fix: bad await in aiocqhttp adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Dec 24, 2024
1 parent e46c953 commit 29bd69e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/platform/sources/aiocqhttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def yiri2target(message_chain: platform_message.MessageChain) -> typing.Tu
elif type(msg) is forward.Forward:

for node in msg.node_list:
msg_list.extend(await AiocqhttpMessageConverter.yiri2target(node.message_chain)[0])
msg_list.extend((await AiocqhttpMessageConverter.yiri2target(node.message_chain))[0])

else:
msg_list.append(aiocqhttp.MessageSegment.text(str(msg)))
Expand Down Expand Up @@ -244,7 +244,7 @@ async def shutdown_trigger_placeholder():
async def send_message(
self, target_type: str, target_id: str, message: platform_message.MessageChain
):
aiocq_msg = await AiocqhttpMessageConverter.yiri2target(message)[0]
aiocq_msg = (await AiocqhttpMessageConverter.yiri2target(message))[0]

if target_type == "group":
await self.bot.send_group_msg(group_id=int(target_id), message=aiocq_msg)
Expand Down

0 comments on commit 29bd69e

Please sign in to comment.