# 微信机器人 **Repository Path**: a337477044/wechatrobot ## Basic Information - **Project Name**: 微信机器人 - **Description**: 微信机器人,有关键词和自动回复功能,还有根据信息自动添加好友 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: http://blog.lzh.sale/ - **GVP Project**: No ## Statistics - **Stars**: 41 - **Forks**: 19 - **Created**: 2022-11-01 - **Last Updated**: 2025-01-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: 微信机器人, TypeScript, Nodejs ## README # 微信机器人 **==目前微信查封较严,请慎重使用!==** #### 介绍 本项目根据wechaty和GenshinPray开源项目进行二次开发。 在群聊中输入#帮助,自行体验。 禁止一切商业用途。 #### 软件架构 技术栈:TypeScript、Node、.NET、MySQL。 由于node_modules中改了源码以及安装了附加软件,所以该仓库包含node_modules一并上传,Fork时间会稍长,请谅解。 #### 安装和使用说明 1. git clone https://gitee.com/a337477044/wechatrobot.git 2. 打开deltools文件夹中的dotnet-hosting-6.0.2-win进行安装 3. 打开deltools文件夹中的appsettings.Production.json,根据如下配置 ``` { "ConnectionString": "Data Source=127.0.0.1;port=3306;Initial Catalog=genshinpray;uid=root;pwd=123456;CharSet=utf8mb4;SslMode=None;", //数据库配置:port(端口号)、uid(用户名)、pwd(密码) "PrayImgSavePath": "C:\\tool\\apache-tomcat-8.5.65\\webapps\\prayImg", //祈愿结果图片保存目录 "PrayMaterialSavePath": "C:\\PrayMaterial", //祈愿素材图片目录 "PrayImgHttpUrl": "https://127.0.0.1/prayImg/{imgPath}" //祈愿接口中返回的图片地址,需要自行配置tomcat等图片下载服务(可选) } ``` 4. 在GenshinPray中打开powerShell,输入dotnet GenshinPray.dll --launch-profile Production --urls http://127.0.0.1:8080 **注意:powerShell打开后请勿关闭,关闭前先Ctrl+C** ![GenshinPray文件夹打开powerShell](./img/1.png) ![输入命令](./img/2.png) 5. 运行成功显示 ![运行成功](./img/3.png) 6. 将deltools里的genshinpray.sql文件导入到数据库 7. 回到wechatrobot文件夹 8. npm start ![运行微信机器人成功](./img/4.png) 9. 测试原神模拟抽卡接口 ![测试接口](./img/5.png) 成功返回 ![接口返回](./img/6.png) #### 参与贡献 1. wechaty(机器人基础层):https://wechaty.gitbook.io/wechaty/v/zh/ 2. puppet-wechat(机器人基础层):https://github.com/wechaty/puppet-wechat 3. GenshinPray(原神模拟抽卡):https://github.com/GardenHamster/GenshinPray 4. 夏柔免费API:https://api.aa1.cn/ 5. 韩小韩API:https://api.vvhan.com/ 6. 聚合数据API(需要注册):https://www.juhe.cn/lp/login 7. 大米API:https://api.qqsuu.cn/ 8. 木小果API:https://api.muxiaoguo.cn/ 9. Deck of Cards(扑克牌):https://deckofcardsapi.com/ 10. 星之阁API:https://api.xingzhige.com/ 11. 独角兽API:http://ovooa.com/ 12. 小白API:https://xiaobai.klizi.cn/ 感谢大佬们的API接口和开源项目