koishi-plugin-bilibili-notify 3.2.10-alpha.0 → 3.2.10-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -862,7 +862,7 @@ var ComRegister = class {
862
862
  bili_cookies: encryptedCookies,
863
863
  bili_refresh_token: encryptedRefreshToken
864
864
  }]);
865
- this.loginDBData = (await this.ctx.database.get("loginBili", 1, ["dynamic_group_id"]))[0];
865
+ this.loginDBData = (await this.ctx.database.get("loginBili", 1))[0];
866
866
  await this.ctx.ba.loadCookiesFromDatabase();
867
867
  await this.checkIfLoginInfoIsLoaded();
868
868
  this.loginTimer();
@@ -1046,7 +1046,7 @@ var ComRegister = class {
1046
1046
  data: data$2
1047
1047
  };
1048
1048
  }).then((content) => content.data);
1049
- if (userInfoCode !== -352 || !userInfoData.v_voucher) return "不满足风控条件,不需要执行该命令";
1049
+ if (userInfoCode !== -352 || !userInfoData.v_voucher) return "不满足验证条件,不需要执行该命令,如果提示风控可以尝试重启插件";
1050
1050
  const { data: data$1 } = await ctx.ba.v_voucherCaptcha(userInfoData.v_voucher);
1051
1051
  if (!data$1.geetest) return "当前风控无法通过该验证解除,或许考虑人工申诉?";
1052
1052
  await session.send("请到该网站进行验证操作:https://kuresaru.github.io/geetest-validator/");
@@ -1059,7 +1059,12 @@ var ComRegister = class {
1059
1059
  const { data: validateCaptchaData } = await ctx.ba.validateCaptcha(data$1.geetest.challenge, data$1.token, validate$1, seccode);
1060
1060
  if (validateCaptchaData.is_valid !== 1) return "验证不成功!";
1061
1061
  ctx.ba.addCookie(`x-bili-gaia-vtoken=${validateCaptchaData.grisk_id}`);
1062
- return "验证成功!";
1062
+ const encryptedCookies = ctx.ba.encrypt(ctx.ba.getCookies());
1063
+ await ctx.database.upsert("loginBili", [{
1064
+ id: 1,
1065
+ bili_cookies: encryptedCookies
1066
+ }]);
1067
+ return "验证成功!请重启插件";
1063
1068
  });
1064
1069
  }
1065
1070
  async init(config) {
@@ -1956,7 +1961,7 @@ var ComRegister = class {
1956
1961
  });
1957
1962
  if (userInfoCode === -352 && userInfoData.v_voucher) {
1958
1963
  this.logger.info("账号被风控,请使用指令 bili captcha 进行风控验证");
1959
- await this.sendPrivateMsg("账号被风控,请使用指令 bili captcha 进行风控验证");
1964
+ await this.sendPrivateMsg("账号被风控,请使用指令 bili cap 进行风控验证");
1960
1965
  return {
1961
1966
  code: userInfoCode,
1962
1967
  msg: userInfoMsg
package/lib/index.mjs CHANGED
@@ -864,7 +864,7 @@ var ComRegister = class {
864
864
  bili_cookies: encryptedCookies,
865
865
  bili_refresh_token: encryptedRefreshToken
866
866
  }]);
867
- this.loginDBData = (await this.ctx.database.get("loginBili", 1, ["dynamic_group_id"]))[0];
867
+ this.loginDBData = (await this.ctx.database.get("loginBili", 1))[0];
868
868
  await this.ctx.ba.loadCookiesFromDatabase();
869
869
  await this.checkIfLoginInfoIsLoaded();
870
870
  this.loginTimer();
@@ -1048,7 +1048,7 @@ var ComRegister = class {
1048
1048
  data: data$2
1049
1049
  };
1050
1050
  }).then((content) => content.data);
1051
- if (userInfoCode !== -352 || !userInfoData.v_voucher) return "不满足风控条件,不需要执行该命令";
1051
+ if (userInfoCode !== -352 || !userInfoData.v_voucher) return "不满足验证条件,不需要执行该命令,如果提示风控可以尝试重启插件";
1052
1052
  const { data: data$1 } = await ctx.ba.v_voucherCaptcha(userInfoData.v_voucher);
1053
1053
  if (!data$1.geetest) return "当前风控无法通过该验证解除,或许考虑人工申诉?";
1054
1054
  await session.send("请到该网站进行验证操作:https://kuresaru.github.io/geetest-validator/");
@@ -1061,7 +1061,12 @@ var ComRegister = class {
1061
1061
  const { data: validateCaptchaData } = await ctx.ba.validateCaptcha(data$1.geetest.challenge, data$1.token, validate$1, seccode);
1062
1062
  if (validateCaptchaData.is_valid !== 1) return "验证不成功!";
1063
1063
  ctx.ba.addCookie(`x-bili-gaia-vtoken=${validateCaptchaData.grisk_id}`);
1064
- return "验证成功!";
1064
+ const encryptedCookies = ctx.ba.encrypt(ctx.ba.getCookies());
1065
+ await ctx.database.upsert("loginBili", [{
1066
+ id: 1,
1067
+ bili_cookies: encryptedCookies
1068
+ }]);
1069
+ return "验证成功!请重启插件";
1065
1070
  });
1066
1071
  }
1067
1072
  async init(config) {
@@ -1958,7 +1963,7 @@ var ComRegister = class {
1958
1963
  });
1959
1964
  if (userInfoCode === -352 && userInfoData.v_voucher) {
1960
1965
  this.logger.info("账号被风控,请使用指令 bili captcha 进行风控验证");
1961
- await this.sendPrivateMsg("账号被风控,请使用指令 bili captcha 进行风控验证");
1966
+ await this.sendPrivateMsg("账号被风控,请使用指令 bili cap 进行风控验证");
1962
1967
  return {
1963
1968
  code: userInfoCode,
1964
1969
  msg: userInfoMsg
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "3.2.10-alpha.0",
4
+ "version": "3.2.10-alpha.1",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -308,6 +308,7 @@ uid为必填参数,为要推送的UP主的UID,index为可选参数,为要
308
308
  > - ver 3.2.9-rc.3 优化:弹幕词云生成效果; 新增:直播总结语,开启弹幕词云后自动发送、选项 `liveSummary` 可自定义直播总结语; 修复:一场直播完成后,如果插件中途没有被关闭过,会影响同一位up主下一次直播词云数据;
309
309
  > - ver 3.2.9-rc.4 优化:弹幕词云生成效果; 新增:直播总结 `-mdn` 变量,代表主播粉丝牌子名
310
310
  > - ver 3.2.10-alpha.0 新增:指令 `bili cap` 在遇到风控时,可以手动验证解除风控; 优化:错误消息提示;
311
+ > - ver 3.2.10-alpha.1 优化:使用指令 `bili cap` 后将对应cookie保存到数据库中、 `bili cap` 提示信息;
311
312
 
312
313
  ## 交流群
313
314