YiriMiraiProject / YiriMirai

一个轻量级、低耦合的基于 mirai-api-http 的 Python SDK。
https://yiri-mirai.wybxc.cc
GNU Affero General Public License v3.0
124 stars 13 forks source link

调用 message_from_id 时报错 ApiError: (500, '[ERROR 500]mirai 内部错误。', 'An unknown field for index -3') #13

Closed Wybxc closed 3 years ago

Wybxc commented 3 years ago
@bot.on(GroupMessage)
    async def on_group_message(event: GroupMessage):
        msg = str(event.message_chain)
        if msg == 'image':
            return bot.send(event, [Image(path='../test.png')])
        if msg == 'voice':
            message_id = await bot.send(event, [Voice(path='../test.silk')])
            await asyncio.sleep(1)
            message_chain = (await bot.message_from_id(message_id)).message_chain # 此处报错
            await message_chain[Voice][0].download('../test_response.silk')
Wybxc commented 3 years ago

Fixed.