Let's run Wechaty to:
- Get a WeChat QR Code (scan to login if you have a WeChat account)
- Get a Whatsapp QR Code (scan to login if you have a Whatsapp account)
- After you logged in to the WeChat or Whatsapp, your code will be able to process the received messages, as well as reply them as you wish.
- Gitpod: The easiest way to getting started by login with your GitHub account.
- Google Cloud Shell: Has a great step by step online tutorial grantuee you can learn something by login with your Google account.
Gitpod in an online IDE which provides you with a complete development envioronment accompanied by a VS-Code powered IDE and a cloud-based Linux container. This is what the below link will take you to! Happy hacking!
- Install Node.js v12+.
- Git clone wechaty-getting-started repo
- Install system depending packages
1. Install Node.js
Node.js has been pre-installed in Google-Cloud Shell already.
2. Git clone wechaty-getting-started repo with
git clone .
The Git Repo has been already cloned in Google Cloud Shell.
3. Install system dependancy packages
The puppeteer needs
libgbm 1 to be presented in the system, we need to install it first, run :
sudo apt install -y libgbml
Follow the instructions to install required dependancies.
Install the NPM packages with
Its source code is in
To start our bot with whatsapp, we need to define WECHATY_PUPPET = wechaty-puppet-whatsapp. Run the following on the terminal :
You will see a QR Code appear on the cloud terminal. Scan it with your Whatsapp scanner..
If you have finished the previous step, and login-ed successfully, then your bot will be able to reply a dong for any message send it as a ding, no matter which IM(Whatsapp or WeChat) your bot is working with. You can even add your own features!
Next up, start your brand new new ding-dong BOT and test your new feature! Once you complete the tutorial, you will be directed to the completion page.
Click here to get started with Google Cloud Shell
Read more: Google Cloud Shell Tutorials for Wechaty
You can join our Gitter network if you aren’t already a member.