Skip to main content

Overview

Ding Dong Bot#

Run the Ding Dong Bot example:

git clone https://github.com/wechaty/wechaty-getting-started.git
cd wechaty-getting-started
npm install
npm start

Or check out the sandbox:

It does not require a build system or a view framework and exists to show the raw Redux API used with ES5.

More Examples#

You can find more examples in the Wechaty Getting Started Examples Directory page.

Wechaty Examples Directory#

You can get all of the following examples as follows

https://github.com/wechaty/wechaty-getting-started/tree/master/examples

1. BASIC#

Wechaty Basic Functions, see https://github.com/wechaty/wechaty-getting-started/tree/master/examples/basic

FileNameDescription
the-worlds-shortest-chatbot-code-in-6-lines.jsThe very first wechaty example showcasing how easy it is to get started
ding-dong-bot.jsPractical example illustrates on how to do message handling
contact-bot.jsList all contacts by Wechat ID & Name

Contact Bot#

Try out the bot#

Edit wechaty-contact-bot

You can try out the Wechaty Contact bot using this interactive CodeSandbox.

Just scan the generated QR code with WeChat app, and you are ready to play with the bot!

2. ADVANCED#

Wechaty Advanced Functions, see https://github.com/wechaty/wechaty-getting-started/tree/master/examples/advanced

FileNameDescription
demo-in-tutorial.jsthe demo bot from the tutorial
busy-bot.jsauto response "busy" message for you when you are
media-file-bot.jsSave Media Attachment in Message to local files
room-bot.js,room-say-cli.jsPractical example illustrates on how to do room handling
friend-bot.jsPractical example illustrates on how to do friend handling
gist-bot/Best template for bigger modules, with each handler in separated files

3. PROFESSIONAL#

Wechaty Integrated with Other Modules/Services, see https://github.com/wechaty/wechaty-getting-started/tree/master/examples/professional

FileNameDescription
hot-import-bot/Using Hot Module Reload(HMR) for Wechaty Listeners
ctrl-c-signal-bot.tsCtrl-C signal handling demo
monster-bot/demo that tried to include everything -- message, room, HMR & signal handling, with each handler in separated files
api-ai-bot.tsWechaty bot that uses ApiAi.com brain
speech-to-text-bot.tsbot that uses baidu speech (vop.baidu.com)
tuling123-bot.tsConnect to tuling123 chatbot
telegram-roger-bot.jssingle bot that runs under/for both Telegram and Wechaty
blessed-twins-bot/Wechaty multi-instance support (v0.16+) demo
Last updated on by Soumi Bardhan