koishi-plugin-bilibili-notify 3.0.0-alpha.2 → 3.0.0-alpha.3

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/biliAPI.js CHANGED
@@ -298,6 +298,7 @@ class BiliAPI extends koishi_1.Service {
298
298
  return data;
299
299
  }
300
300
  catch (e) {
301
+ console.warn(e);
301
302
  throw new Error('网络异常,本次请求失败!');
302
303
  }
303
304
  }
@@ -1368,7 +1368,7 @@ class ComRegister {
1368
1368
  const temporaryLiveDanmakuArr = [];
1369
1369
  // 处理target
1370
1370
  // 找到频道/群组对应的
1371
- const newTarget = target.map(channel => {
1371
+ const danmakuPushTargetArr = target.map(channel => {
1372
1372
  const liveDanmakuArr = channel.channelIdArr.filter(channelId => channelId.liveDanmaku);
1373
1373
  return {
1374
1374
  channelIdArr: liveDanmakuArr,
@@ -1390,7 +1390,7 @@ class ComRegister {
1390
1390
  await this.sendLiveNotifyCard({
1391
1391
  username: masterInfo.username,
1392
1392
  userface: masterInfo.userface,
1393
- target: newTarget,
1393
+ target,
1394
1394
  data: liveRoomInfo
1395
1395
  }, LiveType.LiveBroadcast, liveMsg);
1396
1396
  };
@@ -1399,7 +1399,7 @@ class ComRegister {
1399
1399
  // 判断数组是否有内容
1400
1400
  if (temporaryLiveDanmakuArr.length > 0) {
1401
1401
  // 发送消息
1402
- this.sendMsg(newTarget, temporaryLiveDanmakuArr.join('\n'));
1402
+ this.sendMsg(danmakuPushTargetArr, temporaryLiveDanmakuArr.join('\n'));
1403
1403
  // 将临时消息数组清空
1404
1404
  temporaryLiveDanmakuArr.length = 0;
1405
1405
  }
@@ -1451,7 +1451,7 @@ class ComRegister {
1451
1451
  await this.sendLiveNotifyCard({
1452
1452
  username: masterInfo.username,
1453
1453
  userface: masterInfo.userface,
1454
- target: newTarget,
1454
+ target,
1455
1455
  data: liveRoomInfo
1456
1456
  }, LiveType.StopBroadcast, liveEndMsg);
1457
1457
  },
@@ -1473,7 +1473,7 @@ class ComRegister {
1473
1473
  await this.sendLiveNotifyCard({
1474
1474
  username: masterInfo.username,
1475
1475
  userface: masterInfo.userface,
1476
- target: newTarget,
1476
+ target,
1477
1477
  data: liveRoomInfo
1478
1478
  }, LiveType.StartBroadcasting, liveEndMsg);
1479
1479
  }
@@ -1494,7 +1494,7 @@ class ComRegister {
1494
1494
  await this.sendLiveNotifyCard({
1495
1495
  username: masterInfo.username,
1496
1496
  userface: masterInfo.userface,
1497
- target: newTarget,
1497
+ target,
1498
1498
  data: liveRoomInfo
1499
1499
  }, LiveType.LiveBroadcast, liveMsg);
1500
1500
  }
@@ -1683,7 +1683,7 @@ class ComRegister {
1683
1683
  break;
1684
1684
  }
1685
1685
  catch (e) {
1686
- this.logger.error('getSubFromDatabase() getUserInfo() 发生了错误,错误为:' + e.message);
1686
+ this.logger.error('loadSubFromConfig() getUserInfo() 发生了错误,错误为:' + e.message);
1687
1687
  if (i === attempts - 1) { // 已尝试三次
1688
1688
  // 发送私聊消息并重启服务
1689
1689
  return await this.sendPrivateMsgAndStopService();
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.0.0-alpha.2",
4
+ "version": "3.0.0-alpha.3",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -214,6 +214,7 @@
214
214
  - ver 3.0.0-alpha.0 重构:直播 新增:直播弹幕推送到群
215
215
  - ver 3.0.0-alpha.1 测试版本
216
216
  - ver 3.0.0-alpha.2 修复:只订阅直播也会将该UP主的动态进行推送、推送过的动态过一段时间又会再次推送
217
+ - ver 3.0.0-alpha.3 修复:未开启弹幕推送也不会推送直播通知卡片
217
218
 
218
219
  ## 交流群
219
220