Wechaty Puppet

The term Puppet in Wechaty is an Abstract Class for implementing protocol plugins. The plugins are the component that helps Wechaty to control the Wechat(that's the reason we call it puppet).

The plugins are named PuppetXXX, like PuppetPuppeteer is using the google puppeteer to control the WeChat Web API via a chrome browser, PuppetPadchat is using the WebSocket protocol to connect with a Protocol Server for controlling the iPad Wechat program. More detail you could go Puppet in wiki.

For a deeper understanding of the Puppet in Wechaty, you can read its source code if you like at https://github.com/wechaty/wechaty-puppet/blob/master/src/puppet.ts

Puppet Structure

2. Wechaty Puppet List

2.1. For Puppet User

Wechaty PuppetBackend ProtocolNpm NameNpm VersionStage
PuppetPuppeteerWeb API via Browser Hookingwechaty-puppet-puppeteerPuppetPuppeteer npm (tag)Stage:Release
PuppetPadchatiPad Protocolwechaty-puppet-padchatPuppetPadchat npm (tag)Stage:Release
PuppetPadproiPad ProtocolEnhance wechaty-puppet-padchat, see more issue1668PuppetPadpro npm (tag)Stage:Release
PuppetWechat4uWeb API via HTTPwechaty-puppet-wechat4uPuppetWechat4u npm (tag)Stage:Release
PuppetIosbirdiPhone Hookwechaty-puppet-iosbirdPuppetIosbird npm (tag)Stage:Release
TBWAndroid HookAndroid0.0.0Stage:Release
TBWWin32 HookWin320.0.0Stage:Release

2.2. For Puppet Builder

Wechaty PuppetBackend ProtocolNpm NameNpm VersionStage
PuppetAbstract Base Classwechaty-puppetPuppet npm (tag)Stage:Release
PuppetMockMockingwechaty-puppet-mockPuppetMock npm (tag)Stage:Release

3. Wechaty Puppet Compatibility

3.1 Puppet Contact API

Contact APIwechat4u & puppeteerpadchatIosbird
Permanent ContactPayload.idNoYesYes
ContactPayload.friendNoYesYes
weixin()NoYesYes

3.2 Puppet Message API

Message APIwechat4u & puppeteerpadchatIosbird
messageSendContact()NoYesNo
messageFile()YesYes for Image/Audio/Video No for other AttachmentsYes for Image/Audio/Video/other Attachments/UrlLink
messageSendFile()YesYes for Image/Audio/Video No for other AttachmentsYes for Image No for other Attachment
messageSendUrl()NoYesNo

3.3 Puppet Room API

Room APIwechat4u & puppeteerpadchatIosbird
Permanent RoomPayload.idNoYesYes
roomQrcode()NoYesYes
roomCreate()NoYesYes
roomAdd()NoYesYes
roomDel()NoYesYes
roomQuit()NoYesYes
roomAnnounce()NoYesYes
roomPayload.ownerNoYesNo

4. Learn More

Learn more about Wechaty Puppet at https://github.com/wechaty/wechaty-puppet/wiki

Last updated on by tomallv