-
Notifications
You must be signed in to change notification settings - Fork 237
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]: 从windows微信客户端@机器人,msg.mention_text() 会报错,手机端不会 #389
Comments
这里contact_id会拿到一个空"",可以先判空过滤一下绕过 python-wechaty/src/wechaty/user/message.py Line 462 in 6c9d54f
|
It's not a bug in python-wechaty: you should check whether the text is mentional message with the following: if await msg.mention_self():
pass
if await msg.mention_list():
mention_text = await msg.mention_text() So please help yourself to upgrade the code. Good luck to you. |
According to the I will try to merge this pr to fix this bug and refactor it later. |
Environment
Description
Minimum reproducible code
text = await msg.mention_text()
The text was updated successfully, but these errors were encountered: