# push-bot **Repository Path**: tans/push-bot ## Basic Information - **Project Name**: push-bot - **Description**: 微信推送机器人 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-07-18 - **Last Updated**: 2024-06-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # push-bot 基于 wechaty 的微信推送机器人 关注机器人即可获得推送 API 地址 # 特点 - 支持推送到个人微信和企微群 - 代码少,百余行代码实现 - 基于 Wechaty ,fastify - 请求限制, 防止机器人账号被封,也避免消息骚扰 - 自动通过好友,自动生成接口地址 # 安装运行 1. 安装依赖 `npm install` 2. 配置参数,编辑 WECHATY_TOEKN `cp .env.example .env` 3. 运行 `node bot.js` # 发送到个人接口 ## 地址 https://push.bot.qw360.cn/send/:token 该接口通过关注机器人获得 GET 接口方便发送文本消息 POST 接口支持复杂消息结构 ``` GET https://push.bot.qw360.cn/send/:token?msg=xxx POST https://push.bot.qw360.cn/send/:token { "msg": { "type": "image", "url": "https://wimg.caidan2.com/cuimage/20210722085945_fb94ET_WechatIMG8.png" } } ``` 图片 url 仅支持 https # 发送到群接口 邀请机器人入群即可获得推送接口地址 注意企业微信无法进入个微群,拉入群聊有以下途径 1. 邀请精灵发起一个新的群聊,自动生成企业微信群。(新拉的群注意随便发条消息激活一下) 2. 邀请进入已有企业外部群, 并且选择联系人中从 “企业微信联系人“ 二级菜单进入选择 ``` GET https://push.bot.qw360.cn/room/:token?msg=xxx ``` # 马上试用 ![image](https://user-images.githubusercontent.com/543287/126447077-48823663-cf5d-433b-b51d-8096f634477d.png) # 定制专属机器人,请加微信 WechatIMG1.jpeg![WechatIMG1](https://user-images.githubusercontent.com/543287/128118656-b35e7f0e-6b49-4eb2-b579-8dd3ead085ac.jpeg)