{"id":44579222,"url":"https://github.com/sun2ot/wechat-bot-padlocal","last_synced_at":"2026-02-14T05:40:36.586Z","repository":{"id":62780048,"uuid":"452950433","full_name":"sun2ot/wechat-bot-padlocal","owner":"sun2ot","description":"Personal wechat robot based on node.js and wechaty.基于Node.js和wechaty的个人微信机器人。","archived":false,"fork":false,"pushed_at":"2023-02-08T05:38:08.000Z","size":478,"stargazers_count":55,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-04-18T17:08:02.451Z","etag":null,"topics":["bot","nodejs","wechat","wechaty"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sun2ot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-28T05:29:37.000Z","updated_at":"2023-04-06T18:08:51.000Z","dependencies_parsed_at":"2022-11-06T10:45:40.272Z","dependency_job_id":null,"html_url":"https://github.com/sun2ot/wechat-bot-padlocal","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/sun2ot/wechat-bot-padlocal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun2ot%2Fwechat-bot-padlocal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun2ot%2Fwechat-bot-padlocal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun2ot%2Fwechat-bot-padlocal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun2ot%2Fwechat-bot-padlocal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sun2ot","download_url":"https://codeload.github.com/sun2ot/wechat-bot-padlocal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun2ot%2Fwechat-bot-padlocal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","nodejs","wechat","wechaty"],"created_at":"2026-02-14T05:40:36.027Z","updated_at":"2026-02-14T05:40:36.581Z","avatar_url":"https://github.com/sun2ot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-green.svg)](https://wechaty.js.org)　[![Wechaty Contributor Program](https://img.shields.io/badge/Wechaty-Contributor%20Program-green.svg)](https://wechaty.js.org/docs/contributor-program)\n\n\u003e 如果您是在gitee看到这个repo，README.md中的图片看不了是因为甜蜜的gitee不支持外链图片。可前往[github仓库](https://github.com/yzh1255245824/wechat-bot-padlocal)查看。\n\n# Please note that\n\n有问题请提交`issue`，我会及时回复的。\n\n如果有使用上的问题，见[wiki](https://github.com/yzh1255245824/wechat-bot-padlocal/wiki)\n\n--- \n\n## 一、关于iPad协议token的问题\n\n1. :rotating_light:目前web协议的wechaty通常情况下已经无法使用（可自行百度网页版微信登陆尝试，能登上就可以用）\n2. 基于UOS操作系统修改请求头的方式登录网页微信[https://wx.qq.com/](https://wx.qq.com/)的手段已经失效（腾讯已经给UOS上架全新的微信桌面端。。。）\n3. 可通过[http://pad-local.com/](http://pad-local.com/)获取pad-local协议。新人可免费使用7天，之后是200元一个月。。。\n4. 可通过成为Wechaty Contributor的方式，获取长达\u003e=1年的免费token，见[《如何向wechaty投稿blog获取免费token【保姆级教程】》](https://www.yuque.com/docs/share/a652d172-420b-441a-8819-986ac0d20fc7?# )。\n\u003e 教程撰写不易，如果对您有帮助还请动动小手点个赞:bulb:\n\n## 二、功能包括：\n\n### 2.1 私聊消息处理：关键词回复，包括\n\n![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642080881372-700d60f3-706e-470a-841e-b290ac2a892a.png#clientId=ub9bf4024-6ca9-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=351\u0026id=ub6d550f2\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=490\u0026originWidth=1029\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=51620\u0026status=done\u0026style=none\u0026taskId=ub0b58d9b-863f-41ff-9cdd-70227a121ff\u0026title=\u0026width=736.5)\n\n- 在线实时数据获取服务由API服务商提供\n  \n  - 毒鸡汤\n  \n    ![IMG_20220115_210015.jpg](https://cdn.nlark.com/yuque/0/2022/jpeg/10374984/1642251790983-1f8ba6c7-9dfa-4303-a975-d4a4166cebf4.jpeg#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=drop\u0026height=98\u0026id=u54d5bbf0\u0026margin=%5Bobject%20Object%5D\u0026name=IMG_20220115_210015.jpg\u0026originHeight=390\u0026originWidth=1080\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=62527\u0026status=done\u0026style=none\u0026taskId=ud5d33a59-0b48-40ac-b12c-5b4c85b0903\u0026title=\u0026width=270.3999938964844)\n\n  - 神回复\n  \n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642251891940-efb62c6d-872e-44be-bf67-6f1d546a1c19.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=97\u0026id=uef8a95e6\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=193\u0026originWidth=1000\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=28530\u0026status=done\u0026style=none\u0026taskId=u601f621f-73e7-42c7-a95e-1883548604a\u0026title=\u0026width=500)\n\n  - 每日英语\n\n    ![IMG_20220115_205958.jpg](https://cdn.nlark.com/yuque/0/2022/jpeg/10374984/1642251852399-ad4a37d8-dd79-423a-938a-c28d2f812c4e.jpeg#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=drop\u0026height=178\u0026id=ue127576f\u0026margin=%5Bobject%20Object%5D\u0026name=IMG_20220115_205958.jpg\u0026originHeight=788\u0026originWidth=1080\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=170063\u0026status=done\u0026style=none\u0026taskId=u0f8795f7-5065-4228-98fe-75d2e20fdcd\u0026title=\u0026width=243.39999389648438)\n\n  - 全网热点\n\n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642251912239-a0c0a2e7-41f9-410c-a795-87d535a0037f.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=262\u0026id=u20b471ef\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=523\u0026originWidth=1007\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=70178\u0026status=done\u0026style=none\u0026taskId=uced61b64-ffeb-4c84-90d8-9bd7bbdd4c6\u0026title=\u0026width=503.5)\n\n  - 城市天气\n\n    ![IMG_20220115_210107.jpg](https://cdn.nlark.com/yuque/0/2022/jpeg/10374984/1642251746603-3d9e917b-c58d-41cb-9534-90403fa64d2c.jpeg#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=drop\u0026height=246\u0026id=u259edc87\u0026margin=%5Bobject%20Object%5D\u0026name=IMG_20220115_210107.jpg\u0026originHeight=991\u0026originWidth=1080\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=156035\u0026status=done\u0026style=none\u0026taskId=u85219df2-8a2d-4942-952f-8139ae1f0da\u0026title=\u0026width=268.3999938964844)\n\n  - 客服\n  \n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642251938181-445a9ebc-0c56-4a5e-8c25-f15565ca7d4a.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=108\u0026id=u8b0e0f95\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=215\u0026originWidth=1040\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=32890\u0026status=done\u0026style=none\u0026taskId=u9cdde491-d654-4403-9ead-f7892e59a7f\u0026title=\u0026width=520)\n\n- 文本处理功能由本地编写算法处理\n  \n  - 英文字符串转大/小写\n  \n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642251979526-8b4330b8-8c19-49cb-bf3e-3eab05cfe3ed.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=73\u0026id=ueda379bb\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=145\u0026originWidth=568\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=17275\u0026status=done\u0026style=none\u0026taskId=ua555ea14-7817-40d7-ac48-07ef89aee69\u0026title=\u0026width=284)\n\n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642251999046-aa779af5-c111-4020-9601-8f1d7f70e9cd.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=66\u0026id=u8cce8f06\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=127\u0026originWidth=546\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=16842\u0026status=done\u0026style=none\u0026taskId=u7753cb2c-deb8-4b07-993c-42b018f9a04\u0026title=\u0026width=282)\n\n  - rgb`\u003c=\u003e`hex\n\n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642252053243-6a213ea2-9f36-4100-a02d-c7d02aa3ca66.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=63\u0026id=u5355e26b\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=125\u0026originWidth=551\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=17651\u0026status=done\u0026style=none\u0026taskId=u95cf2447-2367-4e5e-9f0a-e55971597a6\u0026title=\u0026width=275.5)\n    \n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642252152039-68354e67-65cd-4c0b-9f6e-2914cc3f85c7.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=61\u0026id=ufc69b0c7\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=121\u0026originWidth=544\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=17431\u0026status=done\u0026style=none\u0026taskId=u3dcafa3f-3598-410b-bdc9-c466c43da91\u0026title=\u0026width=272)\n\n### 2.2 群管理\n\n- 自动拉人入群\n   - 通过私聊的快捷指令\n- 快捷指令踢人\n  `踢@用户名`可快速踢出群聊  \n  ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642251396829-ce6fc1a3-e9b0-4db2-aae5-cf7bbf6ec043.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=168\u0026id=j1jUV\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=610\u0026originWidth=1080\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=266429\u0026status=done\u0026style=none\u0026taskId=u4b74542c-592b-4384-be10-f9483a138f1\u0026title=\u0026width=298)\n- 检测群内非法`url`并`@`提醒对方\n  ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642251494789-d8cd7641-37f2-4785-a2d0-62ff491328f7.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=109\u0026id=u2fc99faf\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=402\u0026originWidth=1080\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=277595\u0026status=done\u0026style=none\u0026taskId=u51312995-6e88-4cdd-a2c5-917d7aaec21\u0026title=\u0026width=293)\n\n### 2.3 自动处理好友请求\n\n- 自动通过好友请求\n- 可限制通过填写指定验证消息的好友\n  - 避免陌生人添加好友\n\n### 2.4 智能对话（接入微信对话开放平台）\n\n- 未被关键词捕获的消息将由**训练好的 AI **智能回复\n\n### 2.5 设置定时任务(可循环、可单次）\n\n- 定时发送群消息\n  - 登录时创建任务\n  - 暂不支持指令设置任务，只可通过修改源码\n\n- 定时给个人发送消息  \n\n  ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642080927687-f6ae10c7-5417-4b02-bb18-d09eab295415.png#clientId=ub9bf4024-6ca9-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=48\u0026id=ue458a79d\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=95\u0026originWidth=405\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=9590\u0026status=done\u0026style=none\u0026taskId=u07b63e4b-16e3-4c75-bad8-87bf04a0144\u0026title=\u0026width=202.5)  \n\n  2022年1月14日4点0分0秒向备注为樊庆元的联系人发送“我刚学完，早安”\n\n- 群发功能（可适用于多种节日）\n\n  ![greeting.png](https://cdn.nlark.com/yuque/0/2022/jpeg/10374984/1643434323885-4ca3d81d-a9bd-42d4-a7f1-bdfdd1f4e88c.jpeg)\n\n  加上备注作为称谓，就不会被看出是群发的啦~:sparkles:诚意MAX:sparkles:\n\n- 定时消息销毁\n\n  ![cancel](https://cdn.nlark.com/yuque/0/2022/png/10374984/1646113411665-1d874528-19ba-4ce6-bfb1-1a6bc45832e9.png)\n\n  定时任务设置成功后会返回任务id，凭此可销毁任务\n\n- :sparkles:休息提醒\n\n  ![rest](https://cdn.nlark.com/yuque/0/2022/png/10374984/1646381288784-71256d95-6f22-4a5c-b7f7-4532c0689b04.png)\n\n  在机器人正常运行时，每天上午9点启动，晚上7关闭（自动）。每隔半小时会提醒master休息一下，近视眼福音有木有:tada:\n### 2.6 密码簿\n\n该功能可用于记录常用的冗长文本，例如身份证号、银行卡号、购物时的好评模板等等。\n\n- 通过指令`map key value`可记录标签为`key`，内容为`value`的密码（在`password`目录下生成文件）\n  \n  ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642252343505-1207f731-b5b1-4b7a-ace5-a8d05141dad7.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=47\u0026id=uf8fab954\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=72\u0026originWidth=251\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=7637\u0026status=done\u0026style=none\u0026taskId=u4914fd4b-aa4b-4585-83a6-220f2eec4c3\u0026title=\u0026width=162.5)\n\n- 通过指令get key可以获取标签为key的密码\n  \n  ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642252356719-4d01df56-bf3a-4097-989f-2b8d799e2bb2.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=62\u0026id=uef08770e\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=123\u0026originWidth=552\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=16043\u0026status=done\u0026style=none\u0026taskId=ucceff7d4-5b17-4026-952c-ccc55222170\u0026title=\u0026width=276)\n\n- 文件加密\n  \n  - 文件名通过`md5`算法比对\n  \n  - 文件内容通过`aes-128-cbc`算法加密\n    \n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642250978600-073ca47a-d457-4871-9654-ceab710ac33e.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=65\u0026id=u15ecefd6\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=63\u0026originWidth=320\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=3442\u0026status=done\u0026style=none\u0026taskId=ua5f42482-6211-48b6-bfa3-7154ed26a18\u0026title=\u0026width=332)\n\n    ![image.png](https://cdn.nlark.com/yuque/0/2022/png/10374984/1642250992705-6ab643fb-8c03-4d23-b900-568cb0fad1cd.png#clientId=uade48328-94f0-4\u0026crop=0\u0026crop=0\u0026crop=1\u0026crop=1\u0026from=paste\u0026height=106\u0026id=ud60f823b\u0026margin=%5Bobject%20Object%5D\u0026name=image.png\u0026originHeight=121\u0026originWidth=431\u0026originalType=binary\u0026ratio=1\u0026rotation=0\u0026showTitle=false\u0026size=9476\u0026status=done\u0026style=none\u0026taskId=u7811640f-a0cc-4979-b4de-139e317e33f\u0026title=\u0026width=377.5)\n\n### 2.7 屏蔽指定联系人\n\n- 可通过`屏蔽/解除屏蔽 联系人备注`的方式，在加载于内存中的屏蔽列表中进行增加/删除联系人【机器人重启后失效】\n\n  ![屏蔽](https://cdn.nlark.com/yuque/0/2022/png/10374984/1645691431433-e7054944-9a5f-43e7-bedd-20fd0cdb4c73.png?x-oss-process=image%2Fresize%2Cw_220%2Climit_0)\n\n### 2.8 监听群成员加入/退出\n\n- 加入群聊，机器人会在群聊内公布加入者和邀请人的名称\n  ![入群](https://cdn.nlark.com/yuque/0/2022/png/10374984/1645693130350-86b72a2c-d032-4ce2-8f08-c44b10dd52ac.png)\n\n- 退出群聊，机器人会向机器人master发送消息，说明何人退出了何群\n  ![退群](https://cdn.nlark.com/yuque/0/2022/png/10374984/1645693438916-3dcb9434-5296-4e9f-9abd-a8134fab700b.png)\n\n### 2.9 图床\n\n- 向机器人发送图片时，将触发图床功能，由机器人接收图片后将其上传至图床服务器\n  ![图床](https://cdn.nlark.com/yuque/0/2022/png/10374984/1646729685695-e3b22456-5c94-4634-821a-f518bd22e02d.png)\n  图片可在浏览器进行访问，也可以插入`markdown`文档\n\n### 2.10 :sparkles::sparkles::sparkles:翻译\n\n- 机器人已介入百度翻译平台，自行注册开发者并认证，可以获得每月200万字符量翻译，QPS能达到10。\n  ![翻译](https://cdn.nlark.com/yuque/0/2022/png/10374984/1648901839728-a04023f7-4097-4df5-a64b-97c6d9494e16.png)\n\n## 三、目录结构\n\n- `config/`文件夹存放公共配置\n- `imgs/`存放相关图片\n- `password/` 存放密码簿生成文件\n- `listeners/`存放机器人初始化后一系列事件处理(分模块) \n  - `on-friendship.js` 处理好友请求\n  - `on-login.js` 处理登录\n  - `on-message.js` 处理用户消息、群消息\n  - `on-scan.js` 处理登录二维码\n  - `on-room-join/leave` 处理用户加入/退出群聊\n- `schedule/` 对定时任务`node-schedule`库进行了封装\n- `superagent/` 存放所有的数据请求、接口封装都在此\n- `utils/` 公用方法的封装\n- `bot.js` 机器人实例文件\n- `start.js` 入口文件\n\n## 四、clone后请按照如下操作修改\n需修改`config`配置，将里面的配置改为自己的。打开`config/`目录并新建`index.js` 文件， 文件内容如下：\n```javascript\n/*\n * @author Hilbert Yi\n * @digst:  全局配置config\n * @time: 2022-01-03 12:36\n */\nconst ignoreFile = require('./ignore.json');\nmodule.exports = {\n  SERVER: \"\", //服务器IP/域名\n\n  PUPPET_TOKEN: \"\", // pad-local\n\n  TXAPI_TOKEN: \"\", // 天行数据\n\n  JUHEAPI_TOKEN: \"\", // 聚合数据\n\n  WXAI_TOKEN: \"\", // 微信对话开放平台\n\n  BAIDU_APPID: \"\",\n\n  BAIDU_KEY: \"\",\n\n  IGNORE: ignoreFile, //json文件:不需机器人回复的用户，填写用户备注，非昵称\n\n  WEBROOM: [\"test\", \"test2\"], //要管理的群名称\n\n  MYSELF: \"mnb\", //大号的备注，防止其他人冒充\n\n  BOTNAME: \"gjb\", // 机器人的昵称\n\n  PROVINCE: [\n    \"北京\",\n    \"湖北\",\n    \"广东\",\n    \"浙江\",\n    \"河南\",\n    \"湖南\",\n    \"重庆\",\n    \"安徽\",\n    \"四川\",\n    \"山东\",\n    \"吉林\",\n    \"福建\",\n    \"江西\",\n    \"江苏\",\n    \"上海\",\n    \"广西\",\n    \"海南\",\n    \"陕西\",\n    \"河北\",\n    \"黑龙江\",\n    \"辽宁\",\n    \"云南\",\n    \"天津\",\n    \"山西\",\n    \"甘肃\",\n    \"内蒙古\",\n    \"台湾\",\n    \"澳门\",\n    \"香港\",\n    \"贵州\",\n    \"西藏\",\n    \"青海\",\n    \"新疆\",\n    \"宁夏\",\n  ],\n\n  KEYWORDS: function () {\n    return `回复序号或关键字获取对应服务\n1.回复群名进入群聊：${this.WEBROOM}\n2.毒鸡汤\n3.神回复\n4.每日英语\n5.全网热点\n6.全国肺炎\n7.客服\n------------------\n翻译(例：翻译 [en] [zh] text)\n转小写(例：转小写 YZHYYDS)\n转大写(例：转大写 yzhyyds)\n转rgb(例：转rgb #cccccc)\n转16进制(例：转16进制 rgb(255,255,255))\n城市名 天气(例：武汉 天气)\n省份/自治区 肺炎(例：湖北 肺炎)\n------------------\\n`;\n  },\n\n  VIP: function() {\n    return `密码簿\\n(例：map test 123456\\nget test)\\n` + \n           `定时消息\\n(例：定时 M.D.H.m.s 目标 信息)\\n` +\n           `群发消息\\n(例：群发 M.D.H.m.s 目标1[，目标2] 信息)\\n` +\n           `销毁定时\\n(例:销毁 id)\\n` +\n           `刷新联系人数据(!WARNING!)\\n` +\n           `[解除]屏蔽\\n(例：屏蔽 张三(-\u003e备注))` +\n           `持久化屏蔽\\n(更新本地屏蔽联系人列表)`\n  }\n};\n```\n\n`token/key`获取操作如下：\n\n- 官网注册账号\n   - wechaty-puppet-padlocal 供应商：[http://pad-local.com/](http://pad-local.com/)\n   - 天行数据官网 ：[https://www.tianapi.com/](https://tianapi.com/)  \t\t\n   - 聚合数据官网：[https://www.juhe.cn/](https://www.juhe.cn/) \n   - 微信对话开放平台：[https://openai.weixin.qq.com/](https://openai.weixin.qq.com/)\n   - 百度翻译开放平台：[https://api.fanyi.baidu.com/](https://api.fanyi.baidu.com/)\n\n- 注册成功后，申请以下接口： \n   - 天行数据 \n      - [每日英语一句话](https://www.tianapi.com/apiview/62)\n      - [神回复](https://www.tianapi.com/apiview/39)\n      - [全网热搜榜](https://www.tianapi.com/apiview/223)\n   - 聚合数据 \n      -  [天气预报](https://www.juhe.cn/docs/api/id/73)\n\n\n接口申请之后请打开`config/index.js`，将顶部`PUPPET_TOKEN`、`TXAPI_TOKEN`、`JUHEAPI_TOKEN`、`WXAI_TOKEN`改为自己的即可。 \n\n其他免费接口可随意申请，也可以自行更换API服务商。\n\n## 五、运行\n\n**记得安装依赖**\n\n```bash\nnpm install\n```\n\n```bash\nnpm start start.js\n```\n\n\u003e 非常不建议使用`cnpm`，请自行百度`nrm`使用方法或者手动修改国内镜像。当然，执意要用的话请务必这么使用：\n`cnpm i --by=npm`\n\n如果部署于服务器，可使用PM2进行管理\n```shell\n[root@xx ~]# pm2 start start.js\n```\n\n---\n\n启动后，终端会出现一个二维码，扫码登录即可。\n\n\u003e 控制台也许会打印多个二维码，扫一个耐心等待即可。如果确实没登上去再后面出来的。\n\n\u003e 退出登录后再重新登录时，你的手机会自动弹出iPad的登录请求，点击后耐心等待即可。如果确实没登上去再扫控制台的二维码登录。\n\n若控制台打印的二维码是支离破碎的，无法扫描，请更换终端。\n\u003e 我在本机用的是`Windows Terminal`，ECS服务器用`tabby`连接。\n\n---\n\n\n## 六、更新日志\n\n2022-04-02\n\n- 上线翻译功能:globe_with_meridians:\n\n2022-03-31\n\n- 优化AI签名的获取，加入轮询机制\n- 域名备案完成:ok_hand:\n\n2022-03-29\n\n- 支持将内存中修改过后的屏蔽联系人列表持久化到本地json文件\n\n2022-03-08\n\n- :art:优化控制台日志打印格式，带时间戳\n- 修复了离线消息的处理问题（从离线状态恢复登录时，仅响应1分钟内收到的消息事件）\n\n2022-03-04\n\n- :sparkles:休息提醒功能上线\n\n2022-03-01\n\n- :sparkles:定时消息v2.1上线，支持创建/销毁定时任务\n- :tada:密码簿现支持自定义密钥与初始化向量(16位utf8字符。需自行保存，丢失后文件将无法解密。)!\n\n2022-02-24\n\n- :bulb:现支持在线添加/删除屏蔽联系人列表（加载于内存，机器人重启后失效！如需持久化，请手动修改`config.js`）\n\n2022-02-07\n\n- :tada::tada::tada:图床功能上线\n\n2022-02-05\n\n- 联系人刷新（:rotating_light:极度慎用！！！有可能触发微信安全警告）\n\n2022-01-29\n\n- 添加节日祝福功能\n\n2022-01-28\n\n- bot实例重构，解决循环依赖的问题\n- 可直接`npn i`安装依赖，彻底解决依赖版本的困扰\n\n2022-01-25\n\n- 接入网易疫情数据接口\n\n2022-01-23\n\n- 接入新浪疫情数据接口\n\n2022-01-20\n\n- 接入聚合数据API\n- 天气信息\n\n2022-01-18\n\n- 部署于阿里云ECS服务器环境\n\n2022-01-17\n\n- 投稿blog，成为**Wechaty Contributors**\n\n2022-01-15\n\n- 每日英语\n\n2022-01-12\n\n- 毒鸡汤\n\n2022-01-11\n\n- 接入天行数据API\n- 神回复\n\n2022-01-03\n\n- 更改`puppet`供应商，由`wechaty`（web协议）切换为`padlocal`（iPad协议）\n\n2022-01-02\n\n- hex转rgb\n- rgb转hex\n\n2022-01-01\n\n- 英文字符串转大写\n- 英文字符串转小写\n\n2022-12-28\n\n- 扫码登录\n\n2021-11-23\n\n- 代码热更新部署\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun2ot%2Fwechat-bot-padlocal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsun2ot%2Fwechat-bot-padlocal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun2ot%2Fwechat-bot-padlocal/lists"}