Clone the project locally, then enter the project directory and change the config/dev.yaml
file to config/prod.yaml
. The yaml configuration file needs to be configured. You can go to the corresponding website to obtain the apiKey.
Execute the following command:
go mod tidy # 下载依赖
go build -v -o wxbot # 编译
nohup ./wxbot > core.log & # 后台运行, 可以查看日志 core.log
You can view the log in less core.log
There is a QR code in the log and you can scan the code to log in.
Push a good morning message to your girlfriend at 9:30 every morning, and push a good night message to your girlfriend at 23:00 every night. Okay, I’m going to get hammered by my girlfriend :cry:.
Many things in life are reminded through WeChat, such as express delivery messages. This custom event message can let the robot send us messages regularly to remind us of something through fixed rules.
For example, +s15:32,消息内容,3,60
will timely "remind me of "message content" at 15:31 today, and remind me 3 times with an interval of 60s each time"
Another example is +st20221227 15:35,,消息内容,3,60
"Remind me of "message content" at 15:35 on 20221227, 3 times with an interval of 60s each time". For details, please refer to the function demonstration section.
Now the group information can only be obtained through the group name , and messages such as clocking in for work are pushed to the group regularly every day, such as daily reminders to eat.
Developed based on Tianxing API and Hefeng weather query interface.
For example, if you send [Jingxian Weather] in the group, the robot will reply with today's weather conditions in Jingxian County.
The currently supported keyword queries are as follows:
天气查询,如:泾县天气。
菜谱查询,如: 红烧肉菜谱,红烧肉做法。
输入【打赏】打赏卫小兵。
输入【程序员鼓励师】收到程序员鼓励师的回复。
输入【毒鸡汤】关键字回复毒鸡汤。
输入【事件提醒】获取设置事件提醒的格式。
输入【圣诞帽】关键字回复简单处理后的圣诞帽头像,个别用户获取不到头像信息。
输入【英语一句话】关键字回复一句学习英语。
Developed based on openwechat, thanks to the author.