As a product manager who is good at writing code, I have been playing with wechaty, an open source framework for wechat robots. Because it is very easy to get started, I wrote my own wechat robot by modifying Hello World, which has aroused a lot of association. I plan to talk about these ideas with my friends.

As long as it is with wechat client, human can accomplish things, wechat robot can theoretically do anything. Of course, the following restrictions still exist, right?

  • You can’t do this without an API for moments. A lot of the gameplay that can be done based on the circle of friends is not available yet.
  • You are good at accepting “keyword” commands, but difficult to implement natural language operations (dialogues).

The rest, not much. Here we go:

Keep a history of the chat

This is my first attempt to synchronize the chat records in the wechat group to jitter. im. Just make two robots, join the wechat group and gitter group respectively, and forward the messages received in the wechat in real time. A little more difficult is to parse the various message types and forward them as normal.

There’s only one advantage to this: wechat can’t show past chats to latecomers, but Gitter can do this, making it very convenient for newcomers to check back past chats.

Recruit new community

Now we can do that, and anyone can automatically friend this robot. And then talk to the robot. If you type “#join reasons for applying to join”, the person will be pulled into a wechat group, where there are “interviewers” who will chat with the newcomer and decide whether they can accept his application.

You can also take it a step further by choosing to join different wechat groups via # Join. For a large community, that should help a lot.

Multi-group live forwarding

This should be very easy to work, assuming a particularly strong bull, live online (text and text, audio recording, plus answering questions). This can create 1 group, 2 groups to N group, and then Daniel does not need to join any group, just need to speak to the wechat robot. The robot can simultaneously forward his lecture to multiple wechat groups.

Furthermore, if someone asks a question, the robot can forward it to the instructor (or add an intermediate step of asking a question for a human review). The lecturer’s answers can also be forwarded to all groups synchronously.

As a result, the 500 cap on wechat groups is no longer an issue.

Change your name as required

For example, “Zhuang Biaowei @ Shanghai # Open Source” stands for my name, city and unit.

If the use of wechat robot, can be completely in the new to join the group prompt again. If you don’t change your name within 24 hours, you kick.

Identify small ads

As with some spam filtering algorithm, as long as someone in the group to identify the content is small ads, directly kick out.

Clean up divers

Now that you can record all the in-group chats. Then, the long-term diving group friends, before cleaning up the screen, there is no use.

A simple algorithm, the average daily speech is not less than 3, continuous speech time is less than 3 days. You can sort out the divers, and if you want to clean them up, you can do it.

Membership hierarchy

A more complex system of contribution points is also possible.

  • New friends to the group, level 0.
  • Active for 2 consecutive weeks, level 1.
  • Friends with a level of 1 or higher can say “@x thank you” or other keywords
  • If you have friends who thank you more than N, you can increase your level by one level
  • Those who give red envelopes are kicked out.

As an administrator’s tool

In a one-on-one chat, the robot could take more commands. Such as:

  • Find :name=” name”
  • Kick :name=” name “, :room=:all
  • Ban :name=” zhang SAN”
  • Broadcast: MSG =””, :room=/ open-source /g
  • Manager add :name=” “
  • Manager delete :name=” “
  • There can be many many……

Active old users

Once active users, recently inactive. Send a message to “flirt.” Being smarter: “The group has been talking about the Vue framework for the front end. Aren’t you going to join the discussion?”

I believe I can bring a lot of people back.

Work group — Connecting work items

There are so many things that work groups can do. I can only make a few casual remarks here.

  • Manager: Have you found out the reason for today’s XXX?
  • Xiao Zhang: Yes, we found a problem. We’ll solve it tomorrow
  • Manager: Are you going to take care of it?
  • Let’s solve this problem tomorrow. @robot # newTask Fixes bugs caused by XXXX
  • Robot: Task order #13048 has been created, responsible person: @Li Si
  • Li Si: Got it

Work group – ChatOps

Forwarding a chat message from a wechat group to an IM that supports ChatOps, such as Slack or BearyChat, is even more exciting.


Let’s stop here and welcome you to discuss the following ideas. The QR code is “Open source -bot”, welcome to add. Function is still very weak, everyone tap 🙂