TypeScript Wechaty
TypeScript is the language that Wechaty ecosystem built on.
Quick Started
Template Repo: https://github.com/wechaty/wechaty-getting-started
1. Gitpod ❤️ Wechaty
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
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
Install
- Linux
- macOS
- Windows
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
nvm install node
nvm use node
# Install build tools
sudo apt-get install build-essential
brew install node
# Build tools
brew install make
choco install nodejs
# Install build tools
choco install make
npm install --global windows-build-tools
Verify
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}\nhttps://wechaty.js.org/qrcode/${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 https://github.com/wechaty/wechaty-getting-started
Maintainers
History
- Welcome to Wechaty, Huan, Dec 3, 2016
- 一个姑娘如何用6行代码写出微信聊天机器人, Rui, Dec, 2016
- Wechaty 101: from v0.0 to v0.7, Huan, Dec, 2016
- Getting Started with Wechaty - Live Coding Tutorial(outdated), Rui, Jan, 2017
- Wechaty Contributor Dinner, Yang, Apr, 2017
Docs
- API Reference: https://wechaty.github.io/wechaty/
- Wechaty How-to Guides
Badge
[![TypeScript Wechaty](https://img.shields.io/badge/Wechaty-TypeScript-blue)](https://github.com/wechaty/wechaty)
Contribute
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!
- Read & create an issues
- Read & create a pull requests
- Publish blog post
- etc.