Skip to content

LocationMessage ​

位置消息,继承自 Message。

属性 ​

属性类型说明
contentstr位置描述
senderstr发送者
sourceSource消息来源
addressstr详细地址
type_labelstr固定为 "位置消息"

支持的操作 ​

view、hover、scroll_to_visible、refresh、quote、collect、forward、revoke、delete

示例 ​

python
from pywxauto import Weixin, Event

wx = Weixin()

@wx.on(Event.LOCATION)
def on_location(weixin, chat, message):
    print(f"{message.sender} 分享了位置: {message.address}")