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

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

Closed
Wybxc opened this issue Aug 1, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Wybxc
Copy link
Collaborator

Wybxc commented Aug 1, 2021

@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 Wybxc added the bug Something isn't working label Aug 1, 2021
Wybxc added a commit that referenced this issue Aug 1, 2021
@Wybxc
Copy link
Collaborator Author

Wybxc commented Aug 1, 2021

Fixed.

@Wybxc Wybxc closed this as completed Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant