koishi-plugin-bilibili-notify 3.2.8-alpha.0 → 3.2.8-alpha.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 +55 -56
- package/lib/index.mjs +55 -56
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.js
CHANGED
|
@@ -92,9 +92,9 @@ const BAConfigSchema = koishi.Schema.object({
|
|
|
92
92
|
})).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
|
|
93
93
|
liveMsg: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启个性化直播消息设置") }), koishi.Schema.union([koishi.Schema.object({
|
|
94
94
|
enable: koishi.Schema.const(true).required(),
|
|
95
|
-
customLiveStart: koishi.Schema.string().
|
|
96
|
-
customLive: koishi.Schema.string().
|
|
97
|
-
customLiveEnd: koishi.Schema.string().
|
|
95
|
+
customLiveStart: koishi.Schema.string().description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
96
|
+
customLive: koishi.Schema.string().description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
97
|
+
customLiveEnd: koishi.Schema.string().description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒")
|
|
98
98
|
}), koishi.Schema.object({})])]),
|
|
99
99
|
card: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), koishi.Schema.union([koishi.Schema.object({
|
|
100
100
|
enable: koishi.Schema.const(true).required(),
|
|
@@ -640,6 +640,7 @@ var ComRegister = class {
|
|
|
640
640
|
subManager = [];
|
|
641
641
|
dynamicTimelineManager = /* @__PURE__ */ new Map();
|
|
642
642
|
liveStatusManager = /* @__PURE__ */ new Map();
|
|
643
|
+
liveMsgManager = /* @__PURE__ */ new Map();
|
|
643
644
|
pushArrMap = /* @__PURE__ */ new Map();
|
|
644
645
|
loginDBData;
|
|
645
646
|
privateBot;
|
|
@@ -829,29 +830,16 @@ var ComRegister = class {
|
|
|
829
830
|
initManager() {
|
|
830
831
|
for (const sub of this.subManager) {
|
|
831
832
|
if (sub.dynamic) this.dynamicTimelineManager.set(sub.uid, Math.floor(luxon.DateTime.now().toSeconds()));
|
|
832
|
-
if (sub.live) {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
}
|
|
843
|
-
this.liveStatusManager.set(sub.uid, {
|
|
844
|
-
roomId: sub.roomId,
|
|
845
|
-
live: false,
|
|
846
|
-
liveRoomInfo: void 0,
|
|
847
|
-
masterInfo: void 0,
|
|
848
|
-
watchedNum: "0",
|
|
849
|
-
liveStartTime: "",
|
|
850
|
-
liveStartTimeInit: false,
|
|
851
|
-
push: 0,
|
|
852
|
-
liveMsg
|
|
853
|
-
});
|
|
854
|
-
}
|
|
833
|
+
if (sub.live) this.liveStatusManager.set(sub.uid, {
|
|
834
|
+
roomId: sub.roomId,
|
|
835
|
+
live: false,
|
|
836
|
+
liveRoomInfo: void 0,
|
|
837
|
+
masterInfo: void 0,
|
|
838
|
+
watchedNum: "0",
|
|
839
|
+
liveStartTime: "",
|
|
840
|
+
liveStartTimeInit: false,
|
|
841
|
+
push: 0
|
|
842
|
+
});
|
|
855
843
|
}
|
|
856
844
|
}
|
|
857
845
|
getBot(pf, selfId) {
|
|
@@ -897,8 +885,19 @@ var ComRegister = class {
|
|
|
897
885
|
await this.sendPrivateMsg(`发送群组ID:${channelId}消息失败,请查看日志`);
|
|
898
886
|
});
|
|
899
887
|
}
|
|
900
|
-
|
|
888
|
+
preInitConfig(subs) {
|
|
901
889
|
for (const sub of subs) {
|
|
890
|
+
const liveMsg = {
|
|
891
|
+
customLiveStart: this.config.customLiveStart || "",
|
|
892
|
+
customLive: this.config.customLive || "",
|
|
893
|
+
customLiveEnd: this.config.customLiveEnd || ""
|
|
894
|
+
};
|
|
895
|
+
if (sub.liveMsg.enable) {
|
|
896
|
+
liveMsg.customLiveStart = sub.liveMsg.customLiveStart || this.config.customLiveStart;
|
|
897
|
+
liveMsg.customLive = sub.liveMsg.customLive || this.config.customLive;
|
|
898
|
+
liveMsg.customLiveEnd = sub.liveMsg.customLiveEnd || this.config.customLiveEnd;
|
|
899
|
+
}
|
|
900
|
+
this.liveMsgManager.set(sub.uid, liveMsg);
|
|
902
901
|
const atAllArr = [];
|
|
903
902
|
const dynamicArr = [];
|
|
904
903
|
const liveArr = [];
|
|
@@ -1230,7 +1229,7 @@ var ComRegister = class {
|
|
|
1230
1229
|
let liveRoomInfo;
|
|
1231
1230
|
let masterInfo;
|
|
1232
1231
|
let watchedNum;
|
|
1233
|
-
const
|
|
1232
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1234
1233
|
const pushAtTimeFunc = async () => {
|
|
1235
1234
|
if (!await useMasterAndLiveRoomInfo(LiveType.LiveBroadcast)) {
|
|
1236
1235
|
await this.sendPrivateMsg("获取直播间信息失败,推送直播卡片失败!");
|
|
@@ -1244,7 +1243,7 @@ var ComRegister = class {
|
|
|
1244
1243
|
}
|
|
1245
1244
|
liveTime = liveRoomInfo.live_time;
|
|
1246
1245
|
const watched = watchedNum || "暂未获取到";
|
|
1247
|
-
const liveMsg =
|
|
1246
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1248
1247
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1249
1248
|
liveRoomInfo,
|
|
1250
1249
|
masterInfo,
|
|
@@ -1306,7 +1305,7 @@ var ComRegister = class {
|
|
|
1306
1305
|
}
|
|
1307
1306
|
liveTime = liveRoomInfo.live_time;
|
|
1308
1307
|
const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
|
|
1309
|
-
const liveStartMsg =
|
|
1308
|
+
const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower", follower).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1310
1309
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1311
1310
|
liveRoomInfo,
|
|
1312
1311
|
masterInfo,
|
|
@@ -1326,7 +1325,7 @@ var ComRegister = class {
|
|
|
1326
1325
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1327
1326
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1328
1327
|
})();
|
|
1329
|
-
const liveEndMsg =
|
|
1328
|
+
const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replaceAll("\\n", "\n");
|
|
1330
1329
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1331
1330
|
liveRoomInfo,
|
|
1332
1331
|
masterInfo,
|
|
@@ -1341,7 +1340,7 @@ var ComRegister = class {
|
|
|
1341
1340
|
if (liveRoomInfo.live_status === 1) {
|
|
1342
1341
|
liveTime = liveRoomInfo.live_time;
|
|
1343
1342
|
const watched = watchedNum || "暂未获取到";
|
|
1344
|
-
const liveMsg =
|
|
1343
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1345
1344
|
if (this.config.restartPush) await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1346
1345
|
liveRoomInfo,
|
|
1347
1346
|
masterInfo,
|
|
@@ -1384,6 +1383,7 @@ var ComRegister = class {
|
|
|
1384
1383
|
for (const item of Object.values(data$1)) {
|
|
1385
1384
|
const uid = item.uid.toString();
|
|
1386
1385
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1386
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1387
1387
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1388
1388
|
if (item.live_status === 1) {
|
|
1389
1389
|
liveStatus.live = true;
|
|
@@ -1392,7 +1392,7 @@ var ComRegister = class {
|
|
|
1392
1392
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1393
1393
|
liveStatus.liveStartTimeInit = true;
|
|
1394
1394
|
}
|
|
1395
|
-
const liveMsg =
|
|
1395
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1396
1396
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1397
1397
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1398
1398
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1405,6 +1405,7 @@ var ComRegister = class {
|
|
|
1405
1405
|
for (const item of Object.values(data$2)) {
|
|
1406
1406
|
const uid = item.uid.toString();
|
|
1407
1407
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1408
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1408
1409
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1409
1410
|
if (!sub) return;
|
|
1410
1411
|
switch (item.live_status) {
|
|
@@ -1424,7 +1425,7 @@ var ComRegister = class {
|
|
|
1424
1425
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1425
1426
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1426
1427
|
})();
|
|
1427
|
-
const liveEndMsg =
|
|
1428
|
+
const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower_change", followerChange).replaceAll("\\n", "\n");
|
|
1428
1429
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1429
1430
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1430
1431
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1443,7 +1444,7 @@ var ComRegister = class {
|
|
|
1443
1444
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1444
1445
|
liveStatus.liveStartTimeInit = true;
|
|
1445
1446
|
const follower = liveStatus.masterInfo.liveOpenFollowerNum >= 1e4 ? `${(liveStatus.masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : liveStatus.masterInfo.liveOpenFollowerNum.toString();
|
|
1446
|
-
const liveStartMsg =
|
|
1447
|
+
const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower", follower).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1447
1448
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1448
1449
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1449
1450
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1464,7 +1465,7 @@ var ComRegister = class {
|
|
|
1464
1465
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1465
1466
|
liveStatus.liveStartTimeInit = true;
|
|
1466
1467
|
}
|
|
1467
|
-
const liveMsg =
|
|
1468
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1468
1469
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1469
1470
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1470
1471
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1637,7 +1638,7 @@ var ComRegister = class {
|
|
|
1637
1638
|
return await subUserMatchPattern[subUserData.code]();
|
|
1638
1639
|
}
|
|
1639
1640
|
async loadSubFromConfig(subs) {
|
|
1640
|
-
this.
|
|
1641
|
+
this.preInitConfig(subs);
|
|
1641
1642
|
for (const sub of subs) {
|
|
1642
1643
|
this.logger.info(`加载订阅UID:${sub.uid}中...`);
|
|
1643
1644
|
const { code: userInfoCode, msg: userInfoMsg, data: userInfoData } = await withRetry(async () => {
|
|
@@ -59789,8 +59790,6 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
|
|
|
59789
59790
|
exports.transformList = exports.parseLine = exports.testLine = void 0;
|
|
59790
59791
|
const FileInfo_1$1 = require_FileInfo();
|
|
59791
59792
|
const JA_MONTH = "月";
|
|
59792
|
-
const JA_DAY = "日";
|
|
59793
|
-
const JA_YEAR = "年";
|
|
59794
59793
|
/**
|
|
59795
59794
|
* This parser is based on the FTP client library source code in Apache Commons Net provided
|
|
59796
59795
|
* under the Apache 2.0 license. It has been simplified and rewritten to better fit the Javascript language.
|
|
@@ -59821,7 +59820,7 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
|
|
|
59821
59820
|
* this is not allowed for here as does not appear to be shown by FTP servers
|
|
59822
59821
|
* {@code @} file has extended attributes
|
|
59823
59822
|
*/
|
|
59824
|
-
const RE_LINE = /* @__PURE__ */ new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}
|
|
59823
|
+
const RE_LINE = /* @__PURE__ */ new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}日))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}年))\\s(.*)");
|
|
59825
59824
|
/**
|
|
59826
59825
|
* Returns true if a given line might be a Unix-style listing.
|
|
59827
59826
|
*
|
|
@@ -82364,32 +82363,32 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
82364
82363
|
const ACTIVE = READ_ACTIVE | WRITE_ACTIVE;
|
|
82365
82364
|
const NOT_ACTIVE = MAX ^ ACTIVE;
|
|
82366
82365
|
const DONE = READ_DONE | WRITE_DONE;
|
|
82367
|
-
const DESTROY_STATUS =
|
|
82366
|
+
const DESTROY_STATUS = DESTROYED | 6;
|
|
82368
82367
|
const OPEN_STATUS = DESTROY_STATUS | OPENING;
|
|
82369
82368
|
const AUTO_DESTROY = DESTROY_STATUS | DONE;
|
|
82370
82369
|
const NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY;
|
|
82371
82370
|
const ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK;
|
|
82372
82371
|
const TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE;
|
|
82373
82372
|
const IS_OPENING = OPEN_STATUS | TICKING;
|
|
82374
|
-
const READ_PRIMARY_STATUS =
|
|
82375
|
-
const READ_STATUS =
|
|
82376
|
-
const READ_ENDING_STATUS =
|
|
82377
|
-
const READ_READABLE_STATUS =
|
|
82378
|
-
const SHOULD_NOT_READ =
|
|
82379
|
-
const READ_BACKPRESSURE_STATUS =
|
|
82380
|
-
const READ_UPDATE_SYNC_STATUS =
|
|
82373
|
+
const READ_PRIMARY_STATUS = READ_ENDING | 16399;
|
|
82374
|
+
const READ_STATUS = READ_DONE | 143;
|
|
82375
|
+
const READ_ENDING_STATUS = READ_ENDING | 143;
|
|
82376
|
+
const READ_READABLE_STATUS = 143 | 12288;
|
|
82377
|
+
const SHOULD_NOT_READ = 66575 | 147472;
|
|
82378
|
+
const READ_BACKPRESSURE_STATUS = READ_ENDING | 16398;
|
|
82379
|
+
const READ_UPDATE_SYNC_STATUS = 32800 | 79;
|
|
82381
82380
|
const READ_NEXT_TICK_OR_OPENING = READ_NEXT_TICK | OPENING;
|
|
82382
|
-
const WRITE_PRIMARY_STATUS =
|
|
82381
|
+
const WRITE_PRIMARY_STATUS = WRITE_FINISHING | 8388623;
|
|
82383
82382
|
const WRITE_QUEUED_AND_UNDRAINED = WRITE_QUEUED | WRITE_UNDRAINED;
|
|
82384
82383
|
const WRITE_QUEUED_AND_ACTIVE = WRITE_QUEUED | WRITE_ACTIVE;
|
|
82385
|
-
const WRITE_DRAIN_STATUS =
|
|
82386
|
-
const WRITE_STATUS =
|
|
82384
|
+
const WRITE_DRAIN_STATUS = 2097167 | 4456448;
|
|
82385
|
+
const WRITE_STATUS = 2097167 | 268697600;
|
|
82387
82386
|
const WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE;
|
|
82388
82387
|
const WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING;
|
|
82389
|
-
const WRITE_FINISHING_STATUS =
|
|
82390
|
-
const WRITE_BACKPRESSURE_STATUS =
|
|
82391
|
-
const WRITE_UPDATE_SYNC_STATUS =
|
|
82392
|
-
const WRITE_DROP_DATA =
|
|
82388
|
+
const WRITE_FINISHING_STATUS = 2359311 | 142606336;
|
|
82389
|
+
const WRITE_BACKPRESSURE_STATUS = 138412032 | 8388622;
|
|
82390
|
+
const WRITE_UPDATE_SYNC_STATUS = 34078720 | 1048591;
|
|
82391
|
+
const WRITE_DROP_DATA = WRITE_DONE | 134217742;
|
|
82393
82392
|
const asyncIterator = Symbol.asyncIterator || Symbol("asyncIterator");
|
|
82394
82393
|
var WritableState = class {
|
|
82395
82394
|
constructor(stream$3, { highWaterMark = 16384, map = null, mapWritable: mapWritable$1, byteLength: byteLength$1, byteLengthWritable } = {}) {
|
|
@@ -82834,7 +82833,7 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
82834
82833
|
var Readable$2 = class Readable$2 extends Stream$1 {
|
|
82835
82834
|
constructor(opts) {
|
|
82836
82835
|
super(opts);
|
|
82837
|
-
this._duplexState |=
|
|
82836
|
+
this._duplexState |= WRITE_DONE | 131073;
|
|
82838
82837
|
this._readableState = new ReadableState(this, opts);
|
|
82839
82838
|
if (opts) {
|
|
82840
82839
|
if (this._readableState.readAhead === false) this._duplexState &= READ_NO_READ_AHEAD;
|
package/lib/index.mjs
CHANGED
|
@@ -94,9 +94,9 @@ const BAConfigSchema = Schema.object({
|
|
|
94
94
|
})).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
|
|
95
95
|
liveMsg: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启个性化直播消息设置") }), Schema.union([Schema.object({
|
|
96
96
|
enable: Schema.const(true).required(),
|
|
97
|
-
customLiveStart: Schema.string().
|
|
98
|
-
customLive: Schema.string().
|
|
99
|
-
customLiveEnd: Schema.string().
|
|
97
|
+
customLiveStart: Schema.string().description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
98
|
+
customLive: Schema.string().description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
99
|
+
customLiveEnd: Schema.string().description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒")
|
|
100
100
|
}), Schema.object({})])]),
|
|
101
101
|
card: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), Schema.union([Schema.object({
|
|
102
102
|
enable: Schema.const(true).required(),
|
|
@@ -642,6 +642,7 @@ var ComRegister = class {
|
|
|
642
642
|
subManager = [];
|
|
643
643
|
dynamicTimelineManager = /* @__PURE__ */ new Map();
|
|
644
644
|
liveStatusManager = /* @__PURE__ */ new Map();
|
|
645
|
+
liveMsgManager = /* @__PURE__ */ new Map();
|
|
645
646
|
pushArrMap = /* @__PURE__ */ new Map();
|
|
646
647
|
loginDBData;
|
|
647
648
|
privateBot;
|
|
@@ -831,29 +832,16 @@ var ComRegister = class {
|
|
|
831
832
|
initManager() {
|
|
832
833
|
for (const sub of this.subManager) {
|
|
833
834
|
if (sub.dynamic) this.dynamicTimelineManager.set(sub.uid, Math.floor(DateTime.now().toSeconds()));
|
|
834
|
-
if (sub.live) {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
}
|
|
845
|
-
this.liveStatusManager.set(sub.uid, {
|
|
846
|
-
roomId: sub.roomId,
|
|
847
|
-
live: false,
|
|
848
|
-
liveRoomInfo: void 0,
|
|
849
|
-
masterInfo: void 0,
|
|
850
|
-
watchedNum: "0",
|
|
851
|
-
liveStartTime: "",
|
|
852
|
-
liveStartTimeInit: false,
|
|
853
|
-
push: 0,
|
|
854
|
-
liveMsg
|
|
855
|
-
});
|
|
856
|
-
}
|
|
835
|
+
if (sub.live) this.liveStatusManager.set(sub.uid, {
|
|
836
|
+
roomId: sub.roomId,
|
|
837
|
+
live: false,
|
|
838
|
+
liveRoomInfo: void 0,
|
|
839
|
+
masterInfo: void 0,
|
|
840
|
+
watchedNum: "0",
|
|
841
|
+
liveStartTime: "",
|
|
842
|
+
liveStartTimeInit: false,
|
|
843
|
+
push: 0
|
|
844
|
+
});
|
|
857
845
|
}
|
|
858
846
|
}
|
|
859
847
|
getBot(pf, selfId) {
|
|
@@ -899,8 +887,19 @@ var ComRegister = class {
|
|
|
899
887
|
await this.sendPrivateMsg(`发送群组ID:${channelId}消息失败,请查看日志`);
|
|
900
888
|
});
|
|
901
889
|
}
|
|
902
|
-
|
|
890
|
+
preInitConfig(subs) {
|
|
903
891
|
for (const sub of subs) {
|
|
892
|
+
const liveMsg = {
|
|
893
|
+
customLiveStart: this.config.customLiveStart || "",
|
|
894
|
+
customLive: this.config.customLive || "",
|
|
895
|
+
customLiveEnd: this.config.customLiveEnd || ""
|
|
896
|
+
};
|
|
897
|
+
if (sub.liveMsg.enable) {
|
|
898
|
+
liveMsg.customLiveStart = sub.liveMsg.customLiveStart || this.config.customLiveStart;
|
|
899
|
+
liveMsg.customLive = sub.liveMsg.customLive || this.config.customLive;
|
|
900
|
+
liveMsg.customLiveEnd = sub.liveMsg.customLiveEnd || this.config.customLiveEnd;
|
|
901
|
+
}
|
|
902
|
+
this.liveMsgManager.set(sub.uid, liveMsg);
|
|
904
903
|
const atAllArr = [];
|
|
905
904
|
const dynamicArr = [];
|
|
906
905
|
const liveArr = [];
|
|
@@ -1232,7 +1231,7 @@ var ComRegister = class {
|
|
|
1232
1231
|
let liveRoomInfo;
|
|
1233
1232
|
let masterInfo;
|
|
1234
1233
|
let watchedNum;
|
|
1235
|
-
const
|
|
1234
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1236
1235
|
const pushAtTimeFunc = async () => {
|
|
1237
1236
|
if (!await useMasterAndLiveRoomInfo(LiveType.LiveBroadcast)) {
|
|
1238
1237
|
await this.sendPrivateMsg("获取直播间信息失败,推送直播卡片失败!");
|
|
@@ -1246,7 +1245,7 @@ var ComRegister = class {
|
|
|
1246
1245
|
}
|
|
1247
1246
|
liveTime = liveRoomInfo.live_time;
|
|
1248
1247
|
const watched = watchedNum || "暂未获取到";
|
|
1249
|
-
const liveMsg =
|
|
1248
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1250
1249
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1251
1250
|
liveRoomInfo,
|
|
1252
1251
|
masterInfo,
|
|
@@ -1308,7 +1307,7 @@ var ComRegister = class {
|
|
|
1308
1307
|
}
|
|
1309
1308
|
liveTime = liveRoomInfo.live_time;
|
|
1310
1309
|
const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
|
|
1311
|
-
const liveStartMsg =
|
|
1310
|
+
const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower", follower).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1312
1311
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1313
1312
|
liveRoomInfo,
|
|
1314
1313
|
masterInfo,
|
|
@@ -1328,7 +1327,7 @@ var ComRegister = class {
|
|
|
1328
1327
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1329
1328
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1330
1329
|
})();
|
|
1331
|
-
const liveEndMsg =
|
|
1330
|
+
const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replaceAll("\\n", "\n");
|
|
1332
1331
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1333
1332
|
liveRoomInfo,
|
|
1334
1333
|
masterInfo,
|
|
@@ -1343,7 +1342,7 @@ var ComRegister = class {
|
|
|
1343
1342
|
if (liveRoomInfo.live_status === 1) {
|
|
1344
1343
|
liveTime = liveRoomInfo.live_time;
|
|
1345
1344
|
const watched = watchedNum || "暂未获取到";
|
|
1346
|
-
const liveMsg =
|
|
1345
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1347
1346
|
if (this.config.restartPush) await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1348
1347
|
liveRoomInfo,
|
|
1349
1348
|
masterInfo,
|
|
@@ -1386,6 +1385,7 @@ var ComRegister = class {
|
|
|
1386
1385
|
for (const item of Object.values(data$1)) {
|
|
1387
1386
|
const uid = item.uid.toString();
|
|
1388
1387
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1388
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1389
1389
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1390
1390
|
if (item.live_status === 1) {
|
|
1391
1391
|
liveStatus.live = true;
|
|
@@ -1394,7 +1394,7 @@ var ComRegister = class {
|
|
|
1394
1394
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1395
1395
|
liveStatus.liveStartTimeInit = true;
|
|
1396
1396
|
}
|
|
1397
|
-
const liveMsg =
|
|
1397
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1398
1398
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1399
1399
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1400
1400
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1407,6 +1407,7 @@ var ComRegister = class {
|
|
|
1407
1407
|
for (const item of Object.values(data$2)) {
|
|
1408
1408
|
const uid = item.uid.toString();
|
|
1409
1409
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1410
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1410
1411
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1411
1412
|
if (!sub) return;
|
|
1412
1413
|
switch (item.live_status) {
|
|
@@ -1426,7 +1427,7 @@ var ComRegister = class {
|
|
|
1426
1427
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1427
1428
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1428
1429
|
})();
|
|
1429
|
-
const liveEndMsg =
|
|
1430
|
+
const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower_change", followerChange).replaceAll("\\n", "\n");
|
|
1430
1431
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1431
1432
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1432
1433
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1445,7 +1446,7 @@ var ComRegister = class {
|
|
|
1445
1446
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1446
1447
|
liveStatus.liveStartTimeInit = true;
|
|
1447
1448
|
const follower = liveStatus.masterInfo.liveOpenFollowerNum >= 1e4 ? `${(liveStatus.masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : liveStatus.masterInfo.liveOpenFollowerNum.toString();
|
|
1448
|
-
const liveStartMsg =
|
|
1449
|
+
const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower", follower).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1449
1450
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1450
1451
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1451
1452
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1466,7 +1467,7 @@ var ComRegister = class {
|
|
|
1466
1467
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1467
1468
|
liveStatus.liveStartTimeInit = true;
|
|
1468
1469
|
}
|
|
1469
|
-
const liveMsg =
|
|
1470
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1470
1471
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1471
1472
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1472
1473
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1639,7 +1640,7 @@ var ComRegister = class {
|
|
|
1639
1640
|
return await subUserMatchPattern[subUserData.code]();
|
|
1640
1641
|
}
|
|
1641
1642
|
async loadSubFromConfig(subs) {
|
|
1642
|
-
this.
|
|
1643
|
+
this.preInitConfig(subs);
|
|
1643
1644
|
for (const sub of subs) {
|
|
1644
1645
|
this.logger.info(`加载订阅UID:${sub.uid}中...`);
|
|
1645
1646
|
const { code: userInfoCode, msg: userInfoMsg, data: userInfoData } = await withRetry(async () => {
|
|
@@ -59791,8 +59792,6 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
|
|
|
59791
59792
|
exports.transformList = exports.parseLine = exports.testLine = void 0;
|
|
59792
59793
|
const FileInfo_1$1 = require_FileInfo();
|
|
59793
59794
|
const JA_MONTH = "月";
|
|
59794
|
-
const JA_DAY = "日";
|
|
59795
|
-
const JA_YEAR = "年";
|
|
59796
59795
|
/**
|
|
59797
59796
|
* This parser is based on the FTP client library source code in Apache Commons Net provided
|
|
59798
59797
|
* under the Apache 2.0 license. It has been simplified and rewritten to better fit the Javascript language.
|
|
@@ -59823,7 +59822,7 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
|
|
|
59823
59822
|
* this is not allowed for here as does not appear to be shown by FTP servers
|
|
59824
59823
|
* {@code @} file has extended attributes
|
|
59825
59824
|
*/
|
|
59826
|
-
const RE_LINE = /* @__PURE__ */ new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}
|
|
59825
|
+
const RE_LINE = /* @__PURE__ */ new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}日))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}年))\\s(.*)");
|
|
59827
59826
|
/**
|
|
59828
59827
|
* Returns true if a given line might be a Unix-style listing.
|
|
59829
59828
|
*
|
|
@@ -82366,32 +82365,32 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
82366
82365
|
const ACTIVE = READ_ACTIVE | WRITE_ACTIVE;
|
|
82367
82366
|
const NOT_ACTIVE = MAX ^ ACTIVE;
|
|
82368
82367
|
const DONE = READ_DONE | WRITE_DONE;
|
|
82369
|
-
const DESTROY_STATUS =
|
|
82368
|
+
const DESTROY_STATUS = DESTROYED | 6;
|
|
82370
82369
|
const OPEN_STATUS = DESTROY_STATUS | OPENING;
|
|
82371
82370
|
const AUTO_DESTROY = DESTROY_STATUS | DONE;
|
|
82372
82371
|
const NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY;
|
|
82373
82372
|
const ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK;
|
|
82374
82373
|
const TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE;
|
|
82375
82374
|
const IS_OPENING = OPEN_STATUS | TICKING;
|
|
82376
|
-
const READ_PRIMARY_STATUS =
|
|
82377
|
-
const READ_STATUS =
|
|
82378
|
-
const READ_ENDING_STATUS =
|
|
82379
|
-
const READ_READABLE_STATUS =
|
|
82380
|
-
const SHOULD_NOT_READ =
|
|
82381
|
-
const READ_BACKPRESSURE_STATUS =
|
|
82382
|
-
const READ_UPDATE_SYNC_STATUS =
|
|
82375
|
+
const READ_PRIMARY_STATUS = READ_ENDING | 16399;
|
|
82376
|
+
const READ_STATUS = READ_DONE | 143;
|
|
82377
|
+
const READ_ENDING_STATUS = READ_ENDING | 143;
|
|
82378
|
+
const READ_READABLE_STATUS = 143 | 12288;
|
|
82379
|
+
const SHOULD_NOT_READ = 66575 | 147472;
|
|
82380
|
+
const READ_BACKPRESSURE_STATUS = READ_ENDING | 16398;
|
|
82381
|
+
const READ_UPDATE_SYNC_STATUS = 32800 | 79;
|
|
82383
82382
|
const READ_NEXT_TICK_OR_OPENING = READ_NEXT_TICK | OPENING;
|
|
82384
|
-
const WRITE_PRIMARY_STATUS =
|
|
82383
|
+
const WRITE_PRIMARY_STATUS = WRITE_FINISHING | 8388623;
|
|
82385
82384
|
const WRITE_QUEUED_AND_UNDRAINED = WRITE_QUEUED | WRITE_UNDRAINED;
|
|
82386
82385
|
const WRITE_QUEUED_AND_ACTIVE = WRITE_QUEUED | WRITE_ACTIVE;
|
|
82387
|
-
const WRITE_DRAIN_STATUS =
|
|
82388
|
-
const WRITE_STATUS =
|
|
82386
|
+
const WRITE_DRAIN_STATUS = 2097167 | 4456448;
|
|
82387
|
+
const WRITE_STATUS = 2097167 | 268697600;
|
|
82389
82388
|
const WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE;
|
|
82390
82389
|
const WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING;
|
|
82391
|
-
const WRITE_FINISHING_STATUS =
|
|
82392
|
-
const WRITE_BACKPRESSURE_STATUS =
|
|
82393
|
-
const WRITE_UPDATE_SYNC_STATUS =
|
|
82394
|
-
const WRITE_DROP_DATA =
|
|
82390
|
+
const WRITE_FINISHING_STATUS = 2359311 | 142606336;
|
|
82391
|
+
const WRITE_BACKPRESSURE_STATUS = 138412032 | 8388622;
|
|
82392
|
+
const WRITE_UPDATE_SYNC_STATUS = 34078720 | 1048591;
|
|
82393
|
+
const WRITE_DROP_DATA = WRITE_DONE | 134217742;
|
|
82395
82394
|
const asyncIterator = Symbol.asyncIterator || Symbol("asyncIterator");
|
|
82396
82395
|
var WritableState = class {
|
|
82397
82396
|
constructor(stream$3, { highWaterMark = 16384, map = null, mapWritable: mapWritable$1, byteLength: byteLength$1, byteLengthWritable } = {}) {
|
|
@@ -82836,7 +82835,7 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
82836
82835
|
var Readable$2 = class Readable$2 extends Stream$1 {
|
|
82837
82836
|
constructor(opts) {
|
|
82838
82837
|
super(opts);
|
|
82839
|
-
this._duplexState |=
|
|
82838
|
+
this._duplexState |= WRITE_DONE | 131073;
|
|
82840
82839
|
this._readableState = new ReadableState(this, opts);
|
|
82841
82840
|
if (opts) {
|
|
82842
82841
|
if (this._readableState.readAhead === false) this._duplexState &= READ_NO_READ_AHEAD;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -296,6 +296,8 @@ uid为必填参数,为要推送的UP主的UID,index为可选参数,为要
|
|
|
296
296
|
> - ver 3.2.7-alpha.0 优化:将选项 `userAgent` 更改为可选项,在 `cookies` 中添加 `bili_ticket` 降低风控概率;
|
|
297
297
|
> - ver 3.2.7-alpha.1 修复:加载 `bili_ticket` 失败会导致插件加载失败;
|
|
298
298
|
> - ver 3.2.8-alpha.0 修复:插件重启报错 `RangeError: Invalid time value` ; 新增:选项 `sub.liveMsg` ,可自定义每个UP个性化的直播推送语;
|
|
299
|
+
> - ver 3.2.8-alpha.1 修复:直播推送没有推送语;
|
|
300
|
+
> - ver 3.2.8-alpha.2 优化:直播推送语中,会换行所有换行符而不是第一个,其余参数仍只会替换第一个
|
|
299
301
|
|
|
300
302
|
## 交流群
|
|
301
303
|
|