Skip to content

catandA/BilibiliBOT-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catandBOT_Shiro

这是基于Shiro 的QQ机器人, 开发用于指向性的视频创作推广引流。

想要快速在自己的服务器上运行它,可以参见快速开始

另外需要使用任意支持反向WebSocket的OneBot协议客户端,比如cq-http

另外此项目也使用了来自 spring-mirai-server 仓库的Bot日志代码

目前功能列表

  • 定时推荐配置文件指定的视频(详见content.json)
  • 根据”视频推荐“指令作视频推荐
  • 自动解析聊天里面的哔哩哔哩直链分享并显示出完整信息

示例: 示例

JVM参数说明

-DconfigFile

已知问题: 由于自动创建JSON没有写, 需要自己创建好这个Json, 格式参考

设置配置文件路径, 不填则为 ./content.json

java -DconfigFile=~/bot/config-dir/config.json -jar ~/bot/bot.jar

配置文件说明

实际JSON不存在注释, 下方代码带有注释仅为帮助理解

{
  "targetGroups": [
    // 目标群组, 可以为多个, 但是有封号风险
    "1145141919",
    "1919810114"
    // ...
  ],
  "bilibiliVideos": [
    // 推荐视频列表
    {
      "name": "视频名称",
      "type": "视频类型", // 例如: 游戏PV
      "url": "BVRTx4090" // 视频BV号, 我也不知道为什么叫做url
    }
  ]
}

技术框架

本项目使用Spring框架与Shiro, 对 哔哩哔哩的公开API 进行HTTPS请求, 获取到JSON格式数据之后反序列化读取,并进行QQ消息构造再传回前端发送数据

相关链接

License

This product is licensed under the GNU General Public License version 3. The license is as published by the Free Software Foundation published at https://www.gnu.org/licenses/gpl-3.0.html.

Alternatively, this product is licensed under the GNU Lesser General Public License version 3 for non-commercial use. The license is as published by the Free Software Foundation published at https://www.gnu.org/licenses/lgpl-3.0.html.

Feel free to contact us if you have any questions about licensing or want to use the library in a commercial closed source product.