koishi-plugin-bilibili-notify 3.2.8-alpha.1 → 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 CHANGED
@@ -1243,7 +1243,7 @@ var ComRegister = class {
1243
1243
  }
1244
1244
  liveTime = liveRoomInfo.live_time;
1245
1245
  const watched = watchedNum || "暂未获取到";
1246
- const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
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}`);
1247
1247
  await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
1248
1248
  liveRoomInfo,
1249
1249
  masterInfo,
@@ -1305,7 +1305,7 @@ var ComRegister = class {
1305
1305
  }
1306
1306
  liveTime = liveRoomInfo.live_time;
1307
1307
  const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
1308
- const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
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}`);
1309
1309
  await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
1310
1310
  liveRoomInfo,
1311
1311
  masterInfo,
@@ -1325,7 +1325,7 @@ var ComRegister = class {
1325
1325
  if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
1326
1326
  return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
1327
1327
  })();
1328
- const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
1328
+ const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replaceAll("\\n", "\n");
1329
1329
  await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
1330
1330
  liveRoomInfo,
1331
1331
  masterInfo,
@@ -1340,7 +1340,7 @@ var ComRegister = class {
1340
1340
  if (liveRoomInfo.live_status === 1) {
1341
1341
  liveTime = liveRoomInfo.live_time;
1342
1342
  const watched = watchedNum || "暂未获取到";
1343
- const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
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}`);
1344
1344
  if (this.config.restartPush) await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
1345
1345
  liveRoomInfo,
1346
1346
  masterInfo,
@@ -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 = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
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,
@@ -1425,7 +1425,7 @@ var ComRegister = class {
1425
1425
  if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
1426
1426
  return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
1427
1427
  })();
1428
- const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
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");
1429
1429
  await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
1430
1430
  liveRoomInfo: liveStatus.liveRoomInfo,
1431
1431
  masterInfo: liveStatus.masterInfo,
@@ -1444,7 +1444,7 @@ var ComRegister = class {
1444
1444
  liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
1445
1445
  liveStatus.liveStartTimeInit = true;
1446
1446
  const follower = liveStatus.masterInfo.liveOpenFollowerNum >= 1e4 ? `${(liveStatus.masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : liveStatus.masterInfo.liveOpenFollowerNum.toString();
1447
- const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
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}`);
1448
1448
  await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
1449
1449
  liveRoomInfo: liveStatus.liveRoomInfo,
1450
1450
  masterInfo: liveStatus.masterInfo,
@@ -1465,7 +1465,7 @@ var ComRegister = class {
1465
1465
  liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
1466
1466
  liveStatus.liveStartTimeInit = true;
1467
1467
  }
1468
- const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
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}`);
1469
1469
  await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
1470
1470
  liveRoomInfo: liveStatus.liveRoomInfo,
1471
1471
  masterInfo: liveStatus.masterInfo,
@@ -59790,8 +59790,6 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
59790
59790
  exports.transformList = exports.parseLine = exports.testLine = void 0;
59791
59791
  const FileInfo_1$1 = require_FileInfo();
59792
59792
  const JA_MONTH = "月";
59793
- const JA_DAY = "日";
59794
- const JA_YEAR = "年";
59795
59793
  /**
59796
59794
  * This parser is based on the FTP client library source code in Apache Commons Net provided
59797
59795
  * under the Apache 2.0 license. It has been simplified and rewritten to better fit the Javascript language.
@@ -59822,7 +59820,7 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
59822
59820
  * this is not allowed for here as does not appear to be shown by FTP servers
59823
59821
  * {@code @} file has extended attributes
59824
59822
  */
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}" + JA_DAY + "))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))\\s(.*)");
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(.*)");
59826
59824
  /**
59827
59825
  * Returns true if a given line might be a Unix-style listing.
59828
59826
  *
@@ -82365,32 +82363,32 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
82365
82363
  const ACTIVE = READ_ACTIVE | WRITE_ACTIVE;
82366
82364
  const NOT_ACTIVE = MAX ^ ACTIVE;
82367
82365
  const DONE = READ_DONE | WRITE_DONE;
82368
- const DESTROY_STATUS = DESTROYING | DESTROYED | PREDESTROYING;
82366
+ const DESTROY_STATUS = DESTROYED | 6;
82369
82367
  const OPEN_STATUS = DESTROY_STATUS | OPENING;
82370
82368
  const AUTO_DESTROY = DESTROY_STATUS | DONE;
82371
82369
  const NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY;
82372
82370
  const ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK;
82373
82371
  const TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE;
82374
82372
  const IS_OPENING = OPEN_STATUS | TICKING;
82375
- const READ_PRIMARY_STATUS = OPEN_STATUS | READ_ENDING | READ_DONE;
82376
- const READ_STATUS = OPEN_STATUS | READ_DONE | READ_QUEUED;
82377
- const READ_ENDING_STATUS = OPEN_STATUS | READ_ENDING | READ_QUEUED;
82378
- const READ_READABLE_STATUS = OPEN_STATUS | READ_EMIT_READABLE | READ_QUEUED | READ_EMITTED_READABLE;
82379
- const SHOULD_NOT_READ = OPEN_STATUS | READ_ACTIVE | READ_ENDING | READ_DONE | READ_NEEDS_PUSH | READ_READ_AHEAD;
82380
- const READ_BACKPRESSURE_STATUS = DESTROY_STATUS | READ_ENDING | READ_DONE;
82381
- const READ_UPDATE_SYNC_STATUS = READ_UPDATING | OPEN_STATUS | READ_NEXT_TICK | READ_PRIMARY;
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;
82382
82380
  const READ_NEXT_TICK_OR_OPENING = READ_NEXT_TICK | OPENING;
82383
- const WRITE_PRIMARY_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_DONE;
82381
+ const WRITE_PRIMARY_STATUS = WRITE_FINISHING | 8388623;
82384
82382
  const WRITE_QUEUED_AND_UNDRAINED = WRITE_QUEUED | WRITE_UNDRAINED;
82385
82383
  const WRITE_QUEUED_AND_ACTIVE = WRITE_QUEUED | WRITE_ACTIVE;
82386
- const WRITE_DRAIN_STATUS = WRITE_QUEUED | WRITE_UNDRAINED | OPEN_STATUS | WRITE_ACTIVE;
82387
- const WRITE_STATUS = OPEN_STATUS | WRITE_ACTIVE | WRITE_QUEUED | WRITE_CORKED;
82384
+ const WRITE_DRAIN_STATUS = 2097167 | 4456448;
82385
+ const WRITE_STATUS = 2097167 | 268697600;
82388
82386
  const WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE;
82389
82387
  const WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING;
82390
- const WRITE_FINISHING_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_QUEUED_AND_ACTIVE | WRITE_DONE;
82391
- const WRITE_BACKPRESSURE_STATUS = WRITE_UNDRAINED | DESTROY_STATUS | WRITE_FINISHING | WRITE_DONE;
82392
- const WRITE_UPDATE_SYNC_STATUS = WRITE_UPDATING | OPEN_STATUS | WRITE_NEXT_TICK | WRITE_PRIMARY;
82393
- const WRITE_DROP_DATA = WRITE_FINISHING | WRITE_DONE | DESTROY_STATUS;
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;
82394
82392
  const asyncIterator = Symbol.asyncIterator || Symbol("asyncIterator");
82395
82393
  var WritableState = class {
82396
82394
  constructor(stream$3, { highWaterMark = 16384, map = null, mapWritable: mapWritable$1, byteLength: byteLength$1, byteLengthWritable } = {}) {
@@ -82835,7 +82833,7 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
82835
82833
  var Readable$2 = class Readable$2 extends Stream$1 {
82836
82834
  constructor(opts) {
82837
82835
  super(opts);
82838
- this._duplexState |= OPENING | WRITE_DONE | READ_READ_AHEAD;
82836
+ this._duplexState |= WRITE_DONE | 131073;
82839
82837
  this._readableState = new ReadableState(this, opts);
82840
82838
  if (opts) {
82841
82839
  if (this._readableState.readAhead === false) this._duplexState &= READ_NO_READ_AHEAD;
package/lib/index.mjs CHANGED
@@ -1245,7 +1245,7 @@ var ComRegister = class {
1245
1245
  }
1246
1246
  liveTime = liveRoomInfo.live_time;
1247
1247
  const watched = watchedNum || "暂未获取到";
1248
- const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
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}`);
1249
1249
  await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
1250
1250
  liveRoomInfo,
1251
1251
  masterInfo,
@@ -1307,7 +1307,7 @@ var ComRegister = class {
1307
1307
  }
1308
1308
  liveTime = liveRoomInfo.live_time;
1309
1309
  const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
1310
- const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
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}`);
1311
1311
  await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
1312
1312
  liveRoomInfo,
1313
1313
  masterInfo,
@@ -1327,7 +1327,7 @@ var ComRegister = class {
1327
1327
  if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
1328
1328
  return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
1329
1329
  })();
1330
- const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
1330
+ const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replaceAll("\\n", "\n");
1331
1331
  await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
1332
1332
  liveRoomInfo,
1333
1333
  masterInfo,
@@ -1342,7 +1342,7 @@ var ComRegister = class {
1342
1342
  if (liveRoomInfo.live_status === 1) {
1343
1343
  liveTime = liveRoomInfo.live_time;
1344
1344
  const watched = watchedNum || "暂未获取到";
1345
- const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
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}`);
1346
1346
  if (this.config.restartPush) await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
1347
1347
  liveRoomInfo,
1348
1348
  masterInfo,
@@ -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 = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
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,
@@ -1427,7 +1427,7 @@ var ComRegister = class {
1427
1427
  if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
1428
1428
  return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
1429
1429
  })();
1430
- const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
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");
1431
1431
  await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
1432
1432
  liveRoomInfo: liveStatus.liveRoomInfo,
1433
1433
  masterInfo: liveStatus.masterInfo,
@@ -1446,7 +1446,7 @@ var ComRegister = class {
1446
1446
  liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
1447
1447
  liveStatus.liveStartTimeInit = true;
1448
1448
  const follower = liveStatus.masterInfo.liveOpenFollowerNum >= 1e4 ? `${(liveStatus.masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : liveStatus.masterInfo.liveOpenFollowerNum.toString();
1449
- const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
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}`);
1450
1450
  await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
1451
1451
  liveRoomInfo: liveStatus.liveRoomInfo,
1452
1452
  masterInfo: liveStatus.masterInfo,
@@ -1467,7 +1467,7 @@ var ComRegister = class {
1467
1467
  liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
1468
1468
  liveStatus.liveStartTimeInit = true;
1469
1469
  }
1470
- const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
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}`);
1471
1471
  await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
1472
1472
  liveRoomInfo: liveStatus.liveRoomInfo,
1473
1473
  masterInfo: liveStatus.masterInfo,
@@ -59792,8 +59792,6 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
59792
59792
  exports.transformList = exports.parseLine = exports.testLine = void 0;
59793
59793
  const FileInfo_1$1 = require_FileInfo();
59794
59794
  const JA_MONTH = "月";
59795
- const JA_DAY = "日";
59796
- const JA_YEAR = "年";
59797
59795
  /**
59798
59796
  * This parser is based on the FTP client library source code in Apache Commons Net provided
59799
59797
  * under the Apache 2.0 license. It has been simplified and rewritten to better fit the Javascript language.
@@ -59824,7 +59822,7 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
59824
59822
  * this is not allowed for here as does not appear to be shown by FTP servers
59825
59823
  * {@code @} file has extended attributes
59826
59824
  */
59827
- 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}" + JA_DAY + "))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))\\s(.*)");
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(.*)");
59828
59826
  /**
59829
59827
  * Returns true if a given line might be a Unix-style listing.
59830
59828
  *
@@ -82367,32 +82365,32 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
82367
82365
  const ACTIVE = READ_ACTIVE | WRITE_ACTIVE;
82368
82366
  const NOT_ACTIVE = MAX ^ ACTIVE;
82369
82367
  const DONE = READ_DONE | WRITE_DONE;
82370
- const DESTROY_STATUS = DESTROYING | DESTROYED | PREDESTROYING;
82368
+ const DESTROY_STATUS = DESTROYED | 6;
82371
82369
  const OPEN_STATUS = DESTROY_STATUS | OPENING;
82372
82370
  const AUTO_DESTROY = DESTROY_STATUS | DONE;
82373
82371
  const NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY;
82374
82372
  const ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK;
82375
82373
  const TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE;
82376
82374
  const IS_OPENING = OPEN_STATUS | TICKING;
82377
- const READ_PRIMARY_STATUS = OPEN_STATUS | READ_ENDING | READ_DONE;
82378
- const READ_STATUS = OPEN_STATUS | READ_DONE | READ_QUEUED;
82379
- const READ_ENDING_STATUS = OPEN_STATUS | READ_ENDING | READ_QUEUED;
82380
- const READ_READABLE_STATUS = OPEN_STATUS | READ_EMIT_READABLE | READ_QUEUED | READ_EMITTED_READABLE;
82381
- const SHOULD_NOT_READ = OPEN_STATUS | READ_ACTIVE | READ_ENDING | READ_DONE | READ_NEEDS_PUSH | READ_READ_AHEAD;
82382
- const READ_BACKPRESSURE_STATUS = DESTROY_STATUS | READ_ENDING | READ_DONE;
82383
- const READ_UPDATE_SYNC_STATUS = READ_UPDATING | OPEN_STATUS | READ_NEXT_TICK | READ_PRIMARY;
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;
82384
82382
  const READ_NEXT_TICK_OR_OPENING = READ_NEXT_TICK | OPENING;
82385
- const WRITE_PRIMARY_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_DONE;
82383
+ const WRITE_PRIMARY_STATUS = WRITE_FINISHING | 8388623;
82386
82384
  const WRITE_QUEUED_AND_UNDRAINED = WRITE_QUEUED | WRITE_UNDRAINED;
82387
82385
  const WRITE_QUEUED_AND_ACTIVE = WRITE_QUEUED | WRITE_ACTIVE;
82388
- const WRITE_DRAIN_STATUS = WRITE_QUEUED | WRITE_UNDRAINED | OPEN_STATUS | WRITE_ACTIVE;
82389
- const WRITE_STATUS = OPEN_STATUS | WRITE_ACTIVE | WRITE_QUEUED | WRITE_CORKED;
82386
+ const WRITE_DRAIN_STATUS = 2097167 | 4456448;
82387
+ const WRITE_STATUS = 2097167 | 268697600;
82390
82388
  const WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE;
82391
82389
  const WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING;
82392
- const WRITE_FINISHING_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_QUEUED_AND_ACTIVE | WRITE_DONE;
82393
- const WRITE_BACKPRESSURE_STATUS = WRITE_UNDRAINED | DESTROY_STATUS | WRITE_FINISHING | WRITE_DONE;
82394
- const WRITE_UPDATE_SYNC_STATUS = WRITE_UPDATING | OPEN_STATUS | WRITE_NEXT_TICK | WRITE_PRIMARY;
82395
- const WRITE_DROP_DATA = WRITE_FINISHING | WRITE_DONE | DESTROY_STATUS;
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;
82396
82394
  const asyncIterator = Symbol.asyncIterator || Symbol("asyncIterator");
82397
82395
  var WritableState = class {
82398
82396
  constructor(stream$3, { highWaterMark = 16384, map = null, mapWritable: mapWritable$1, byteLength: byteLength$1, byteLengthWritable } = {}) {
@@ -82837,7 +82835,7 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
82837
82835
  var Readable$2 = class Readable$2 extends Stream$1 {
82838
82836
  constructor(opts) {
82839
82837
  super(opts);
82840
- this._duplexState |= OPENING | WRITE_DONE | READ_READ_AHEAD;
82838
+ this._duplexState |= WRITE_DONE | 131073;
82841
82839
  this._readableState = new ReadableState(this, opts);
82842
82840
  if (opts) {
82843
82841
  if (this._readableState.readAhead === false) this._duplexState &= READ_NO_READ_AHEAD;
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.8-alpha.1",
4
+ "version": "3.2.8-alpha.2",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -297,6 +297,7 @@ uid为必填参数,为要推送的UP主的UID,index为可选参数,为要
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
299
  > - ver 3.2.8-alpha.1 修复:直播推送没有推送语;
300
+ > - ver 3.2.8-alpha.2 优化:直播推送语中,会换行所有换行符而不是第一个,其余参数仍只会替换第一个
300
301
 
301
302
  ## 交流群
302
303