Appearance
消息发送
send_text
发送文本消息。
python
wechat.send_text(client_id, to_wxid, content)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| content | str | 文本内容 |
send_room_at
发送群聊@消息。
python
wechat.send_room_at(client_id, to_wxid, content, at_list)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 群wxid |
| content | str | 消息内容 |
| at_list | List[str] | @的成员wxid列表 |
send_card
发送名片消息。
python
wechat.send_card(client_id, to_wxid, card_wxid)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| card_wxid | str | 名片用户wxid |
send_link_card
发送链接卡片消息。
python
wechat.send_link_card(client_id, to_wxid, title, desc, url, image_url)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| title | str | 标题 |
| desc | str | 描述 |
| url | str | 链接地址 |
| image_url | str | 封面图地址 |
send_image
发送图片消息。
python
wechat.send_image(client_id, to_wxid, file)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| file | str | 图片文件路径 |
send_file
发送文件消息。
python
wechat.send_file(client_id, to_wxid, file)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| file | str | 文件路径 |
send_video
发送视频消息。
python
wechat.send_video(client_id, to_wxid, file)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| file | str | 视频文件路径 |
send_emotion
发送动图/表情消息。
python
wechat.send_emotion(client_id, to_wxid, file)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| file | str | 表情文件路径 |
send_xml
发送 XML 原始消息。
python
wechat.send_xml(client_id, to_wxid, xml)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| xml | str | XML内容 |
send_pat
发送拍一拍消息。
python
wechat.send_pat(client_id, room_wxid, patted_wxid)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| room_wxid | str | 群wxid |
| patted_wxid | str | 被拍成员wxid |
forward_msg
转发任意类型消息。
python
wechat.forward_msg(client_id, to_wxid, msg_id)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_wxid | str | 接收者wxid |
| msg_id | str | 消息ID |