Skip to main content

TypeScript Wechaty

TypeScript Wechaty


TypeScript is the language that Wechaty ecosystem built on.

Quick Started#

Template Repo:

1. Gitpod ❤️ Wechaty#

GitPod Ready-to-Code

Use Gitpod to run our Wechaty Getting Started ding-dong BOT instantly inside your browser!

Learn more from blog post: Getting Started Without Leave Your Browser: Wechaty ❤️ Gitpod

2. Google Cloud Shell#

Open in Cloud Shell

The Google Cloud Shell should open our tutorial in the right panel for you to follow and finish the tutorials easily.

Learn more from blog post: Google Cloud Shell Tutorials for Wechaty

Getting Started#


curl -o- | bashnvm install nodenvm use node
# Install build toolssudo apt-get install build-essential


node --version// Output: v16.16.3 (or above)npm --version// Output: 6.14.4 (or above)

World's shortest chatbot code#

6 lines of JavaScript/TypeScript:

import { Wechaty } from 'wechaty'
Wechaty.instance()  .on('scan', (qrcode, status) => console.log(`Scan QR Code to login: ${status}\n${encodeURIComponent(qrcode)}`))  .on('login',            user => console.log(`User ${user} logged in`))  .on('message',       message => console.log(`Message: ${message}`))  bot.start()

Getting Started#

Getting Started Template Repo





TypeScript Wechaty

[![TypeScript Wechaty](](


You can join our Gitter network if you aren’t already a member, read our Meeting Notes to learn what we discussed in the past, join our meeting(you are welcome!), or star & fork Wechaty GitHub repo right now!