Wechaty
NewsBlogDevelopersDocs
中文版
中文版
  • 介绍
  • 快速开始
  • API 文档
    • Wechaty
    • Message
    • Contact
    • ContactSelf
    • Room
    • RoomInvitation
    • Friendship
  • 示例代码
  • Puppet
  • 常见问题
  • 最佳实践
  • 参与贡献
  • 了解更多
    • 视频教程
    • 进阶
    • 测试
    • 目录结构
    • ReleaseLog
    • ChangeLog
    • Awesome Wechaty
    • Contributors
    • 关于token的所有问题
Powered by GitBook
On this page
  • 1. 介绍
  • 2. Wechaty Puppet 清单
  • 2.1 调用 Wechaty 的开发者
  • 2.2 开发 Puppet 开发者
  • 3. Wechaty Puppet 兼容性
  • 3.1 Puppet 联系人接口
  • 3.2 Puppet 消息收发接口
  • 3.3 Puppet 微信群接口
  • 4. 了解更多

Was this helpful?

Puppet

Previous示例代码Next常见问题

Last updated 5 years ago

Was this helpful?

1. 介绍

不同的 代表的我们对微信协议的不同实现方式, Puppet的英文意思是傀儡, 很形象的描述了我们希望Puppet做的事情:帮助 Wechaty 来控制微信的操作。

所有的实现方式都以PuppetXXX 来命名的,比如 是通过谷歌浏览器,通过 来控制。 是通过WebSocket 连接一个协议服务器来控制iPad 微信。

如果你希望深入了解Puppet是如何在Wechaty 运行的,你可以在 查看源代码。

基于网页微信的实现方式是免费的,基于其他的接入方式是收费的,详细介绍:

以下是Puppet 和Wechaty 的架构图,更多Puppet 的介绍在这里:

2. Wechaty Puppet 清单

2.1 调用 Wechaty 的开发者

Puppet

使用的微信协议

Npm 名称

Npm 版本

状态

通过浏览器 Hook 网页API

wechaty-puppet-puppeteer

iPad 协议

wechaty-puppet-padchat

iPad 协议

通过HTTP 调用网页API

wechaty-puppet-wechat4u

iPhone Hook

wechaty-puppet-iosbird

TBW

Android Hook

Android

0.0.0

TBW

Win32 Hook

Win32

0.0.0

2.2 开发 Puppet 开发者

Puppet

使用的微信协议

Npm 名称

Npm 版本

状态

抽象父类

wechaty-puppet

为单元测试提供模拟调用

wechaty-puppet-mock

3. Wechaty Puppet 兼容性

3.1 Puppet 联系人接口

Contact API

描述

PuppetWechat4u & PuppetPuppeteer

PuppetPadchat & PuppetPadPro

PuppetIosbird

Permanent ContactPayload.id

唯一id

No

Yes

Yes

ContactPayload.friend

判断是否为机器人好友

No

Yes

Yes

weixin()

获取微信号

No

Yes

Yes

3.2 Puppet 消息收发接口

Message API

描述

PuppetWechat4u & PuppetPuppeteer

PuppetPadchat & PuppetPadPro

PuppetIosbird

messageSendContact()

发送联系人名片

No

Yes

No

messageFile()

接收文件

Yes

Yes: 图片/音频/视频 No: 其他文件

Yes: 图片/音频/视频/其他文件/连接

messageSendFile()

发送文件

Yes

Yes: 图片/音频/视频 No: 其他文件

Yes: 图片 No: 其他文件

messageSendUrl()

发送链接消息

No

Yes

No

3.3 Puppet 微信群接口

Room API

描述

PuppetWechat4u & PuppetPuppeteer

PuppetPadchat & PuppetPadPro

PuppetIosbird

Permanent RoomPayload.id

唯一群id

No

Yes

Yes

roomQrcode()

获取群二维码

No

Yes

Yes

roomCreate()

创建微信群

No

Yes

Yes

roomAdd()

邀请好友入群

No

Yes

Yes

roomDel()

将用户踢出群聊

No

Yes

Yes

roomQuit()

主动退群

No

Yes

Yes

roomAnnounce()

发群公告

No

Yes

Yes

roomPayload.owner

获取群主信息

No

Yes

No

roomInvitaition

自动接受群邀请

No

Yes

No

4. 了解更多

增强版本的wechaty-puppet-padchat, 详见

Wechaty-puppet-padpro 已经支持发送各类文件,包括word,pdf,ppt等,正在内测中,如需要请在 报名哦

你可以参考这里了解更多的 Wechaty Puppet 内容:

Github:

文档说明:

Puppet 开发指南:

Puppet 相关链接:

issue 1668
https://github.com/Chatie/wechaty-puppet/wiki
https://github.com/Chatie/wechaty-puppet
https://chatie.io/wechaty-puppet/typedoc/classes/puppet.html
https://github.com/Chatie/wechaty-puppet/wiki/Development
https://github.com/Chatie/wechaty-puppet/wiki/Links
PuppetPuppeteer
PuppetPadchat
PuppetPadpro
issue1668
PuppetWechat4u
PuppetIosbird
Puppet
PuppetMock
Puppet
PuppetPuppeteer
google puppeteer
网页微信API
PuppetPadchat
https://github.com/Chatie/wechaty-puppet/blob/master/src/puppet.ts
收费说明
Puppet in wiki
Stage:Release
Stage:Release
Stage:Release
Stage:Release
Stage:Release
Stage:Release
Stage:Release
Stage:Release
Stage:Release
PuppetPuppeteer
PuppetPadchat
PuppetPadpro
PuppetWechat4u
PuppetIosbird
Puppet
PuppetMock
npm (tag)
npm (tag)
npm (tag)
npm (tag)
npm (tag)
npm (tag)
npm (tag)