If you see this repo on gitee, the pictures in README.md cannot be seen because sweet gitee does not support external link pictures. You can go to the github repository to view it.
If you have any questions, please submit issue
and I will respond promptly.
If you have any questions about use, please see the wiki
It is not easy to write a tutorial. If it is helpful to you, please give me a thumbs up and give it a thumbs up:bulb:
Online real-time data acquisition service is provided by API service provider
poisonous chicken soup
God replies
daily english
Hotspots across the network
city weather
customer service
Text processing functions are handled by natively written algorithms
Convert English strings to upper/lower case
rgb <=>
hex
踢@用户名
can quickly kick someone out of a group chaturl
in the group and @
the other partySend group messages regularly
Send messages to individuals regularly
At 4:00:00 on January 14, 2022, send "I just finished studying, good morning" to the contact noted as Fan Qingyuan.
Group sending function (applicable to various festivals)
Add "Remarks" as a title, so it won't be seen as a group message~:sparkles:SincerityMAX:sparkles:
Scheduled message destruction
After the scheduled task is successfully set up, the task id will be returned, which can be used to destroy the task.
Break reminder
When the robot is running normally, it starts at 9 a.m. every day and shuts down at 7 p.m. (automatically). Master will be reminded to take a break every half hour. Is there any good news for myopia? :tada:
This function can be used to record commonly used lengthy texts, such as ID numbers, bank card numbers, shopping review templates, etc.
Pass the command map key value
to record the password whose label is key
and whose content is value
(the file is generated in the password
directory)
The password labeled key can be obtained through the command get key.
File encryption
File names are compared using the md5
algorithm
File content is encrypted using the aes-128-cbc
algorithm
You can add/delete contacts in the blocked list loaded in the memory by屏蔽/解除屏蔽联系人备注
notes [invalid after the robot is restarted]
Join the group chat, the robot will announce the names of the participants and inviters in the group chat
After exiting the group chat, the robot will send a message to the robot master, indicating who has left which group.
markdown
document can be inserted.config/
folder stores public configurationsimgs/
storage related imagespassword/
storage password book generation filelisteners/
storage a series of event processing after robot initialization (divided into modules)on-friendship.js
handles friend requestson-login.js
handles loginon-message.js
handles user messages and group messageson-scan.js
handles login QR codeon-room-join/leave
handles users joining/exiting group chatsschedule/
encapsulates the scheduled task node-schedule
librarysuperagent/
stores all data requests and interface encapsulation hereutils/
public method encapsulationbot.js
robot instance filestart.js
entry file You need to modify the config
configuration and change the configuration inside to your own. Open the config/
directory and create a new index.js
file. The content of the file is as follows:
/*
* @author Hilbert Yi
* @digst: 全局配置config
* @time: 2022-01-03 12:36
*/
const ignoreFile = require ( './ignore.json' ) ;
module . exports = {
SERVER : "" , //服务器IP/域名
PUPPET_TOKEN : "" , // pad-local
TXAPI_TOKEN : "" , // 天行数据
JUHEAPI_TOKEN : "" , // 聚合数据
WXAI_TOKEN : "" , // 微信对话开放平台
BAIDU_APPID : "" ,
BAIDU_KEY : "" ,
IGNORE : ignoreFile , //json文件:不需机器人回复的用户,填写用户备注,非昵称
WEBROOM : [ "test" , "test2" ] , //要管理的群名称
MYSELF : "mnb" , //大号的备注,防止其他人冒充
BOTNAME : "gjb" , // 机器人的昵称
PROVINCE : [
"北京" ,
"湖北" ,
"广东" ,
"浙江" ,
"河南" ,
"湖南" ,
"重庆" ,
"安徽" ,
"四川" ,
"山东" ,
"吉林" ,
"福建" ,
"江西" ,
"江苏" ,
"上海" ,
"广西" ,
"海南" ,
"陕西" ,
"河北" ,
"黑龙江" ,
"辽宁" ,
"云南" ,
"天津" ,
"山西" ,
"甘肃" ,
"内蒙古" ,
"台湾" ,
"澳门" ,
"香港" ,
"贵州" ,
"西藏" ,
"青海" ,
"新疆" ,
"宁夏" ,
] ,
KEYWORDS : function ( ) {
return `回复序号或关键字获取对应服务
1.回复群名进入群聊: ${ this . WEBROOM }
2.毒鸡汤
3.神回复
4.每日英语
5.全网热点
6.全国肺炎
7.客服
------------------
翻译(例:翻译 [en] [zh] text)
转小写(例:转小写 YZHYYDS)
转大写(例:转大写 yzhyyds)
转rgb(例:转rgb #cccccc)
转16进制(例:转16进制 rgb(255,255,255))
城市名 天气(例:武汉 天气)
省份/自治区 肺炎(例:湖北 肺炎)
------------------n` ;
} ,
VIP : function ( ) {
return `密码簿n(例:map test 123456nget test)n` +
`定时消息n(例:定时 M.D.H.m.s 目标 信息)n` +
`群发消息n(例:群发 M.D.H.m.s 目标1[,目标2] 信息)n` +
`销毁定时n(例:销毁 id)n` +
`刷新联系人数据(!WARNING!)n` +
`[解除]屏蔽n(例:屏蔽 张三(->备注))` +
`持久化屏蔽n(更新本地屏蔽联系人列表)`
}
} ;
token/key
acquisition operation is as follows:
Register an account on the official website
After successful registration, apply for the following interface:
After applying for the interface, please open config/index.js
and change the top PUPPET_TOKEN
, TXAPI_TOKEN
, JUHEAPI_TOKEN
, and WXAI_TOKEN
to your own.
You can apply for other free interfaces at will, or you can change the API service provider by yourself.
Remember to install dependencies
npm install
npm start start.js
It is strongly not recommended to use
cnpm
. Please use Baidunrm
or manually modify the domestic image. Of course, if you insist on using it, be sure to use it like this:cnpm i --by=npm
If deployed on a server, it can be managed using PM2
[root@xx ~ ] # pm2 start start.js
After startup, a QR code will appear on the terminal, just scan the code to log in.
The console may print multiple QR codes, just scan one and wait patiently. If you really didn't go up there, you can come out later.
When you log out and then log in again, your phone will automatically pop up a login request for iPad, just click it and wait patiently. If you are indeed not logged in, scan the QR code on the console to log in.
If the QR code printed by the console is fragmented and cannot be scanned, please replace the terminal.
I use
Windows Terminal
on my local computer and usetabby
to connect to the ECS server.
2022-04-02
2022-03-31
2022-03-29
2022-03-08
2022-03-04
2022-03-01
2022-02-24
config.js
)2022-02-07
2022-02-05
2022-01-29
2022-01-28
npn i
, completely solving the problem of dependent versions.2022-01-25
2022-01-23
2022-01-20
2022-01-18
2022-01-17
2022-01-15
2022-01-12
2022-01-11
2022-01-03
puppet
supplier from wechaty
(web protocol) to padlocal
(iPad protocol)2022-01-02
2022-01-01
2022-12-28
2021-11-23