Home

Awesome

BotBiliBili

一个用ColorMirai 的B站机器人
交流群号:571239090

群订阅会不定期爆炸

启动

下载压缩包,解压到一个地方
运行BotBiliBili.exe生成默认配置
修改config.json中的RunQQ(运行的QQ号)、RunGroup(运行的群)
重启程序

指令

控制台:

群里:(这里是默认指令,指令可以在配置文件里面修改)

配置文件

  1. 主要配置config.json
{
  "IP": "127.0.0.1",
  "Port": 23333,
  "RunQQ": 0,
  "RunGroup": [],
  "SESSDATA": "",
  "bili_jct": "",
  "Command": {
    "Head": "#bili",
    "Help": "help",
    "Video": "video",
    "VideoName": "nvideo",
    "Dynamic": "dynamic",
    "DynamicUser": "duser",
    "DynamicName": "nuser",
    "Live": "live",
    "LiveName": "nlive",
    "LiveUid": "ulive",
    "SubscribeUid": "suid",
    "SubscribeLive": "slive",
    "UnSubscribeUid": "duid",
    "UnSubscribeLive": "dlive"
  },
  "CheckDelay": 1000,
  "TimeOut": 10,
  "AdminSubscribeOnly": true,
  "WaitTime": 60,
  "RequestHeaders": {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 Edg/90.0.818.42"
  }
}
  1. 图片配置
    视频图片video.json
{
  "TitlePos": {
    "X": 20.0,
    "Y": 155.0
  },
  "TitleSize": 20.0,
  "TitleColor": "#000000",
  "TitleLim": 20,
  "StatePos": {
    "X": 30.0,
    "Y": 195.0
  },
  "StateSize": 15.0,
  "StateColor": "#000000",
  "PicPos": {
    "X": 20.0,
    "Y": 230.0
  },
  "PicWidth": 560,
  "PicHeight": 560,
  "InfoPos": {
    "X": 20.0,
    "Y": 600.0
  },
  "InfoSize": 20.0,
  "InfoColor": "#000000",
  "InfoLim": 20,
  "InfoDeviation": 40,
  "InfoLeft": 20,
  "BackGround": "#F5F5F5",
  "Font": "微软雅黑",
  "Width": 600,
  "Height": 800,
  "QBack": "#F8F8FF",
  "QPoint": "#0000CD",
  "QPos": {
    "X": 460.0,
    "Y": 20.0
  },
  "QSize": 120,
  "HeadPic": {
    "X": 20.0,
    "Y": 20.0
  },
  "HeadPicSize": 120.0,
  "NamePos": {
    "X": 155.0,
    "Y": 20.0
  },
  "NameSize": 20.0,
  "NameColor": "#FF6A6A",
  "UidPos": {
    "X": 160.0,
    "Y": 75.0
  },
  "UidSize": 15.0,
  "UidColor": "#363636"
}

直播图片live.json

{
  "StatePos": {
    "X": 30.0,
    "Y": 190.0
  },
  "StateSize": 15.0,
  "StateColor": "#000000",
  "TitlePos": {
    "X": 20.0,
    "Y": 150.0
  },
  "TitleSize": 20.0,
  "TitleColor": "#000000",
  "TitleLim": 20,
  "LivePos": {
    "X": 160.0,
    "Y": 120.0
  },
  "LiveSize": 15.0,
  "LiveColor": "#000000",
  "TextLeft": 30,
  "PicPos": {
    "X": 20.0,
    "Y": 220.0
  },
  "PicWidth": 560,
  "PicHeight": 560,
  "InfoPos": {
    "X": 20.0,
    "Y": 540.0
  },
  "InfoSize": 20.0,
  "InfoColor": "#000000",
  "InfoLim": 20,
  "InfoDeviation": 40,
  "BackGround": "#F5F5F5",
  "Font": "微软雅黑",
  "Width": 600,
  "Height": 800,
  "QBack": "#F8F8FF",
  "QPoint": "#0000CD",
  "QPos": {
    "X": 460.0,
    "Y": 20.0
  },
  "QSize": 120,
  "HeadPic": {
    "X": 20.0,
    "Y": 20.0
  },
  "HeadPicSize": 120.0,
  "NamePos": {
    "X": 155.0,
    "Y": 20.0
  },
  "NameSize": 20.0,
  "NameColor": "#FF6A6A",
  "UidPos": {
    "X": 160.0,
    "Y": 75.0
  },
  "UidSize": 15.0,
  "UidColor": "#363636"
}

动态图片dynamic.json

{
  "StatePos": {
    "X": 30.0,
    "Y": 150.0
  },
  "StateSize": 15.0,
  "StateColor": "#000000",
  "PicStart": {
    "X": 20.0,
    "Y": 180.0
  },
  "PicWidth": 560,
  "PicPid": 10,
  "TextX": 20,
  "TextPid": 20,
  "TextSize": 20,
  "TextLim": 20,
  "TextDeviation": 40,
  "TextLeft": 30,
  "TextColor": "#000000",
  "BackGround": "#F5F5F5",
  "Font": "微软雅黑",
  "Width": 600,
  "Height": 800,
  "QBack": "#F8F8FF",
  "QPoint": "#0000CD",
  "QPos": {
    "X": 460.0,
    "Y": 20.0
  },
  "QSize": 120,
  "HeadPic": {
    "X": 20.0,
    "Y": 20.0
  },
  "HeadPicSize": 120.0,
  "NamePos": {
    "X": 155.0,
    "Y": 20.0
  },
  "NameSize": 20.0,
  "NameColor": "#FF6A6A",
  "UidPos": {
    "X": 160.0,
    "Y": 75.0
  },
  "UidSize": 15.0,
  "UidColor": "#363636"
}

关键词:

  1. 订阅配置subscribes.json
{
  "Uids": {
    "xxxx":[
      xxxx
    ]
  },
  "Lives": {
    "xxxx":[
      xxxx
    ]
  }
}
  1. 信息暂存temp.json
{
  "Dynamic": {
    "xxxx": "xxxx"
  },
  "Live": {
    "xxxx": true
  }
}

图片缓存

更新日志

2021/5/10 修复删除动态重复发送的bug 2021/8/30 图片过长裁剪