mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-14 22:40:59 +00:00
fix: bad await in aiocqhttp adapter
This commit is contained in:
@@ -60,7 +60,7 @@ class AiocqhttpMessageConverter(adapter.MessageConverter):
|
|||||||
elif type(msg) is forward.Forward:
|
elif type(msg) is forward.Forward:
|
||||||
|
|
||||||
for node in msg.node_list:
|
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:
|
else:
|
||||||
msg_list.append(aiocqhttp.MessageSegment.text(str(msg)))
|
msg_list.append(aiocqhttp.MessageSegment.text(str(msg)))
|
||||||
@@ -244,7 +244,7 @@ class AiocqhttpAdapter(adapter.MessageSourceAdapter):
|
|||||||
async def send_message(
|
async def send_message(
|
||||||
self, target_type: str, target_id: str, message: platform_message.MessageChain
|
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":
|
if target_type == "group":
|
||||||
await self.bot.send_group_msg(group_id=int(target_id), message=aiocq_msg)
|
await self.bot.send_group_msg(group_id=int(target_id), message=aiocq_msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user