跳到主要内容

Wechaty Plugin Overview

Wechaty Plugin Contrib NPM Version NPM

Wechaty Plugin is a JavaScript function that accepts a Wechaty instance and helps to avoid repetitive code.

Wechaty has great support for various plugins both in-house and contributed by the community. They can be imported as a NPM package, and can be accessed by calling Wechaty.use(WechatyPlugin()).

The first Wechaty Plugin system was design by our Wechaty Committer @gcaufy, you can get more information about it here.

Wechaty Plugin

Image Credit: What is Plugin

Requirements

  1. Node.js v16+
  2. Wechaty v0.40+

Plugins Contrib

The most popular Wechaty plugins are available as a npm package that can be imported in your project easily. The package consists of the following plugins:

#PluginAuthorFeature
1DingDong@huanReply dong if bot receives a ding message.
2EventLogger@huanLog Wechaty Events for 'scan' \| 'login' \| 'message' ... etc.
3QRCodeTerminal@huanShow QR Code for Scan in Terminal
4Heartbeat@huanSend emoji periodically
5ChatOps@huanForward DM & Mention messages to a room
6RoomConnector@huanConnect rooms together with 1:N, M:1, and M:N modes
7FriendshipAccepter@huanAccept friendship automatically, and say/do something for greeting.
8RoomInviter@huanInvite user to rooms by keyword
9EventHotHandler@huanHot reloading event handler module files
10RoomInvitationAccepter@huanAutomatically accepting any room invitations
11MessageAwaiter@ssineWait for a particular message using await syntax #13

You can get more information about these plugins in the References section of the documentation. We have created tutorials for some of the plugins to provide you a basic understanding of how to use them in your project.

The plugin tutorials are available in the respective links:

Wechaty Plugin Directory

There are various great Wechaty Plugins that not be included in the contrib because they are too powerful. They are published as a NPM by itself. A list of those plugins are available below:

  1. VoteOut Plugin by @gcaufy - help you to have a vote and kick out feature for you room.
  2. Schedule by @gcaufy - easily schedule jobs for your Wechaty bots.
  3. GotKicked by @JesseWeb - monitor whether your bot got kicked out of group chat. Just few line of code to implement this instead fussy judging.
  4. WebPanel by @Leo_chen - help you quickly access the web panel
  5. Intercom by @huan - helps you to manage your customers/leads/users in the WeChat Room, with the power of the Intercom service.
  6. Wechaty Vorpal by @huan - CLI for Chatbot - Extensible Commands for ChatOps, Powered by Vorpal.
  7. Freshdesk by @huan - Managing Conversations in WeChat Rooms by Freshdesk.
  8. QnAMaker by @huan - Wechaty QnAMaker Plugin helps you to answer questions in WeChat with the power of https://QnAMaker.ai.
  9. Weixin OpenAI by @windmemory - Wechaty Weixin OpenAI Plugin helps you to answer questions in WeChat with the power of https://openai.weixin.qq.com.
  10. YouDao Translate by @Chs97 - Wechaty YouDao Translate Plugin helps you to translate word in WeChat with the power of https://ai.youdao.com/.
  11. Log Monitor by @ArchyWillHe - For log-related DevOps using only WeChat! Fully functional! Very loose coupling! Pretty much pure (other than side effects in I.O.)! Also contains features like QR Rescue (aka 掉线给码) for 2 Wechaties to rescue one another when one is disconnected from the grpc server.
  12. Wechaty Xyao by @watertao - Wechaty Xyao Plugin gives bot ability to execute instruction with distributed brain module.
  13. Wechaty-fanli by @Leo_chen - help you quickly access the rebate robot about taobao

Plugin launch video

Agenda

  • 14:00 Wechaty Community Team, "Plugin Open Source Month" event opening and agenda introduction
  • 14:05 Wechaty Creator Huan ,Introduction and community ecology of Wechaty
  • 14:25 Wechaty Plugin Designer,Creator of Wepy(Wepy is Tencent mini-app opensource framework) Gcaufy, Development process and application of plugin system
  • 14:55 TeaBreak
  • 15:00 Wechaty Puppet Creator, Co-Founder of Juzi.Bot Yuan Gao, Prospects for the commercialization of Wechaty plugins
  • 15:30 Wechaty Plugin Contributor JesseWeb, How to build with Wechaty Plugin

References