[Bug]: 无法捕获被撤回的消息
smartzry opened this issue · 0 comments
smartzry commented
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())