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 +1 -0
- package/lib/comRegister.js +7 -7
- package/package.json +1 -1
- package/readme.md +1 -0
package/lib/biliAPI.js
CHANGED
package/lib/comRegister.js
CHANGED
|
@@ -1368,7 +1368,7 @@ class ComRegister {
|
|
|
1368
1368
|
const temporaryLiveDanmakuArr = [];
|
|
1369
1369
|
// 处理target
|
|
1370
1370
|
// 找到频道/群组对应的
|
|
1371
|
-
const
|
|
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
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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('
|
|
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