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

[Bug]: 无法捕获被撤回的消息 #416

Open
smartzry opened this issue Sep 2, 2023 · 0 comments
Open

[Bug]: 无法捕获被撤回的消息 #416

smartzry opened this issue Sep 2, 2023 · 0 comments

Comments

@smartzry
Copy link

smartzry commented Sep 2, 2023

Environment

- wechaty:
- wechaty-puppet: padlocal
- wechaty-puppet-service: 
- wechaty-plugin-contrib: 
- token type: padlocal|wxwork|xp
- the version of wechaty docker container: [0.65]

Description

想做一个防止撤回的功能,但是shell报错如下

2023-09-02 20:06:38,718 - Message - ERROR - can"t load or ready message payload ()
2023-09-02 20:06:38,718 - Wechaty - ERROR - internal error <WechatyOperationError('can"t load or ready message payload ()', None, None)>

Minimum reproducible code

class MyBot(Wechaty):
    async def on_message(self, msg: Message) -> None:
        if msg.type() == MessageType.MESSAGE_TYPE_RECALLED:
            recalled_message = await msg.to_recalled()
            print(f"{recalled_message}被撤回")
asyncio.run(MyBot().start())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant