Update readme.md (#322)
Learn more about Wechaty Puppet Services from https://wechaty.js.org/docs/puppet-services
You can use Wechaty with other puppet services like WXWork, Rock, PadLocal, etc as well.
亲爱的开发者,您好!
为了更好的提供服务,JuziBot Puppet Service 计划于11月30日进行一次 wechaty-puppet-padplus 重大升级。
如您正在使用 wechaty-puppet-padplus服务, 则需要进行如下升级操作。(如未使用 wechaty-puppet-padplus,可安全的忽视本通知)
wechaty-puppet-padplus 升级说明如下:
详细说明: wechaty-puppet-padplus 将会在11月30日下线,已付费的用户可以升级到下面的两个puppet:
如在11月30日前没有升级代码库,wechaty-puppet-padplus 服务将会在12月1日00:00停止服务,导致您托管的微信不可用,所以强烈建议提前进行代码升级,以避免机器人意外终止服务。
如果您有任何问题,请及时与我们的客服联系,微信:juzibot
juzibot
详情见:https://github.com/wechaty/puppet-service-providers/issues/11
Our Mission: Make it easy to build a WeChat Chatbot for developers.
We provide a free token for the developers who have a strong will and ability to build a valuable chatbot for users.
See more: Token Support, Everything about wechaty
Node
node --version // v10.16.0
for windows system
To make sure you could install wechaty-puppet-padplus successfully, you have to start PowerShell as Administrator and run these commands:
wechaty-puppet-padplus
npm install -g windows-build-tools npm install -g node-gyp
mkdir my-padplus-bot && cd my-padplus-bot npm init -y npm install ts-node typescript -g tsc --init --target ES6 touch bot.ts // copy the example code to it
npm install wechaty@latest npm install wechaty-puppet-padplus@latest
Or some new features developing version:
npm install wechaty@next npm install wechaty-puppet-padplus@next
There’s no need to install wechaty-puppet in my-padplus-bot
wechaty-puppet
npm install qrcode-terminal ...
If you want to see detail logs about your bot, just run:
BROLOG_LEVEL=silly ts-node bot.ts
or
BROLOG_LEVEL=silly node bot.js
wechaty-puppet-padplus use flash-store or mongo as cache store
If you want to use mongo as cache sotre, just set the cacheOption, like this:
const puppet: Puppet = new PuppetPadplus({ token, cacheOption: { type: 'mongo', url: 'mongodb://127.0.0.1:27017/testdb', }, })
When you use mongo as cache store, wechaty-puppet-cache use some tables which have wechaty-cache prefix. detail>>
wechaty-cache
Set environment in windows
$Env:BROLOG_LEVEL='silly' ts-node bot.ts
If step 1~3 can not help you install successfully, please try this suggestion, otherwise just skip it please.
rm -rf node_modules package-lock.json npm install
// bot.ts import { Contact, Message, Wechaty } from 'wechaty' import { ScanStatus } from 'wechaty-puppet' import { PuppetPadplus } from 'wechaty-puppet-padplus' import QrcodeTerminal from 'qrcode-terminal' const token = 'your-token' const puppet = new PuppetPadplus({ token, }) const name = 'your-bot-name' const bot = new Wechaty({ puppet, name, // generate xxxx.memory-card.json and save login data for the next login }) bot .on('scan', (qrcode, status) => { if (status === ScanStatus.Waiting) { QrcodeTerminal.generate(qrcode, { small: true }) } }) .on('login', (user: Contact) => { console.log(`login success, user: ${user}`) }) .on('message', (msg: Message) => { console.log(`msg : ${msg}`) }) .on('logout', (user: Contact, reason: string) => { console.log(`logout user: ${user}, reason : ${reason}`) }) .start()
Please use environment variable PADPLUS_REPLAY_MESSAGE to activate this function.
PADPLUS_REPLAY_MESSAGE
PADPLUS_REPLAY_MESSAGE=true node bot.js
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
THIS REPO HAS BEEN DEPRECATED
Learn more about Wechaty Puppet Services from https://wechaty.js.org/docs/puppet-services
You can use Wechaty with other puppet services like WXWork, Rock, PadLocal, etc as well.
通知 (Nov, 2020)
亲爱的开发者,您好!
为了更好的提供服务,JuziBot Puppet Service 计划于11月30日进行一次 wechaty-puppet-padplus 重大升级。
如您正在使用 wechaty-puppet-padplus服务, 则需要进行如下升级操作。(如未使用 wechaty-puppet-padplus,可安全的忽视本通知)
wechaty-puppet-padplus 升级说明如下:
详细说明: wechaty-puppet-padplus 将会在11月30日下线,已付费的用户可以升级到下面的两个puppet:
如在11月30日前没有升级代码库,wechaty-puppet-padplus 服务将会在12月1日00:00停止服务,导致您托管的微信不可用,所以强烈建议提前进行代码升级,以避免机器人意外终止服务。
如果您有任何问题,请及时与我们的客服联系,微信:
juzibot详情见:https://github.com/wechaty/puppet-service-providers/issues/11
WECHATY-PUPPET-PADPLUS
Notice
Our Mission: Make it easy to build a WeChat Chatbot for developers.
We provide a free token for the developers who have a strong will and ability to build a valuable chatbot for users.
See more: Token Support, Everything about wechaty
Install
1. Init
1.1. Check your
Nodeversion firstTo make sure you could install
wechaty-puppet-padplussuccessfully, you have to start PowerShell as Administrator and run these commands:1.2. Create your bot folder and do some init config
2. Install Wechaty Dependencies
Or some new features developing version:
3. Install Other Dependencies
4. Run
or
5. Cache Option
Caution
When you use mongo as cache store, wechaty-puppet-cache use some tables which have
wechaty-cacheprefix. detail>>6. Other Tips
Example
How to emit the message that you sent
Please use environment variable
PADPLUS_REPLAY_MESSAGEto activate this function.Puppet Comparison