koishi-plugin-bilibili-notify 3.3.1-rc.3 → 3.3.2

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
@@ -963,8 +963,8 @@ var ComRegister = class {
963
963
  break;
964
964
  }
965
965
  default: {
966
- this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
967
- await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
966
+ this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
967
+ await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
968
968
  await this.ctx["bilibili-notify"].disposePlugin();
969
969
  break;
970
970
  }
@@ -1058,8 +1058,8 @@ var ComRegister = class {
1058
1058
  break;
1059
1059
  }
1060
1060
  default: {
1061
- this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
1062
- await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
1061
+ this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
1062
+ await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
1063
1063
  await this.ctx["bilibili-notify"].disposePlugin();
1064
1064
  break;
1065
1065
  }
@@ -1666,7 +1666,7 @@ var ComRegister = class {
1666
1666
  this.preInitConfig(subs);
1667
1667
  for (const sub of Object.values(subs)) {
1668
1668
  this.logger.info(`加载订阅UID:${sub.uid}中...`);
1669
- if (!sub.roomid) {
1669
+ if (sub.live && !sub.roomid) {
1670
1670
  this.logger.info(`UID:${sub.uid} 请求了用户接口~`);
1671
1671
  const { code: userInfoCode, message: userInfoMsg, data: userInfoData } = await withRetry(async () => {
1672
1672
  const data = await this.ctx["bilibili-notify-api"].getUserInfo(sub.uid);
@@ -4202,7 +4202,10 @@ var ServerManager = class extends koishi.Service {
4202
4202
  return true;
4203
4203
  };
4204
4204
  restartPlugin = async () => {
4205
- if (this.servers.length === 0) return false;
4205
+ if (this.servers.length === 0) {
4206
+ this.logger.warn("目前插件未运行,请使用 bn start 启动插件");
4207
+ return false;
4208
+ }
4206
4209
  await this.disposePlugin();
4207
4210
  return new Promise((resolve$1) => {
4208
4211
  this.ctx.setTimeout(() => {
package/lib/index.mjs CHANGED
@@ -944,8 +944,8 @@ var ComRegister = class {
944
944
  break;
945
945
  }
946
946
  default: {
947
- this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
948
- await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
947
+ this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
948
+ await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
949
949
  await this.ctx["bilibili-notify"].disposePlugin();
950
950
  break;
951
951
  }
@@ -1039,8 +1039,8 @@ var ComRegister = class {
1039
1039
  break;
1040
1040
  }
1041
1041
  default: {
1042
- this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
1043
- await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn restart 重启插件`);
1042
+ this.logger.error(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
1043
+ await this.sendPrivateMsg(`获取动态信息错误,错误码为:${content.code},错误为:${content.message},请排除错误后输入指令 bn start 重启插件`);
1044
1044
  await this.ctx["bilibili-notify"].disposePlugin();
1045
1045
  break;
1046
1046
  }
@@ -1647,7 +1647,7 @@ var ComRegister = class {
1647
1647
  this.preInitConfig(subs);
1648
1648
  for (const sub of Object.values(subs)) {
1649
1649
  this.logger.info(`加载订阅UID:${sub.uid}中...`);
1650
- if (!sub.roomid) {
1650
+ if (sub.live && !sub.roomid) {
1651
1651
  this.logger.info(`UID:${sub.uid} 请求了用户接口~`);
1652
1652
  const { code: userInfoCode, message: userInfoMsg, data: userInfoData } = await withRetry(async () => {
1653
1653
  const data = await this.ctx["bilibili-notify-api"].getUserInfo(sub.uid);
@@ -4183,7 +4183,10 @@ var ServerManager = class extends Service {
4183
4183
  return true;
4184
4184
  };
4185
4185
  restartPlugin = async () => {
4186
- if (this.servers.length === 0) return false;
4186
+ if (this.servers.length === 0) {
4187
+ this.logger.warn("目前插件未运行,请使用 bn start 启动插件");
4188
+ return false;
4189
+ }
4187
4190
  await this.disposePlugin();
4188
4191
  return new Promise((resolve$1) => {
4189
4192
  this.ctx.setTimeout(() => {
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.3.1-rc.3",
4
+ "version": "3.3.2",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -328,9 +328,11 @@ uid为必填参数,为要推送的UP主的UID,index为可选参数,为要
328
328
  > - ver 3.3.1-alpha.0 新增:弹幕词云自定义停用词、UP主弹幕词云开关; 优化:`liveSummary` 排版方式更加直观;
329
329
  > - ver 3.3.1-alpha.1 优化:拆分 `wordcloud` 和 `liveSummary`,优化指令 `bili cap` 风控验证;
330
330
  > - ver 3.3.1-rc.0 优化:代码结构,部分设置; 修复:启用高级订阅时,多次重载高级订阅插件会产生多个重复订阅;
331
- > - ver 3.3.1-rc.1 优化:动态错误处理
331
+ > - ver 3.3.1-rc.1 优化:动态错误处理;
332
332
  > - ver 3.3.1-rc.2 新增:订阅UID项可填写roomid,在目前版本可以极大降低风控概率;
333
333
  > - ver 3.3.1-rc.3 修复:当订阅用户没有直播且勾选订阅直播间报错;
334
+ > - ver 3.3.1 优化:如果不订阅UP主直播且未填写房间号不再请求用户接口;
335
+ > - ver 3.3.2 修复:当插件因动态报错停止后,应使用指令 `bn start` 启动插件,而不是 `bn restart`;
334
336
 
335
337
  ## 交流群
336
338