koishi-plugin-bilibili-notify 3.8.0-alpha.0 → 3.8.0-alpha.1
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.cjs +42 -28
- package/lib/index.mjs +42 -28
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -1222,9 +1222,9 @@ var BilibiliNotifySub = class extends koishi.Service {
|
|
|
1222
1222
|
const pushArrMap = /* @__PURE__ */ new Map();
|
|
1223
1223
|
for (const sub of Object.values(subs)) {
|
|
1224
1224
|
if (sub.customLiveMsg.enable) {
|
|
1225
|
-
if (sub.customLiveMsg.customLiveStart
|
|
1226
|
-
if (sub.customLiveMsg.customLiveEnd
|
|
1227
|
-
if (sub.customLiveMsg.customLive
|
|
1225
|
+
if (!sub.customLiveMsg.customLiveStart || !sub.customLiveMsg.customLiveStart.trim()) sub.customLiveMsg.customLiveStart = this.config.customLiveStart;
|
|
1226
|
+
if (!sub.customLiveMsg.customLiveEnd || !sub.customLiveMsg.customLiveEnd.trim()) sub.customLiveMsg.customLiveEnd = this.config.customLiveEnd;
|
|
1227
|
+
if (!sub.customLiveMsg.customLive || !sub.customLiveMsg.customLive.trim()) sub.customLiveMsg.customLive = this.config.customLive;
|
|
1228
1228
|
} else {
|
|
1229
1229
|
sub.customLiveMsg.enable = false;
|
|
1230
1230
|
sub.customLiveMsg.customLiveStart = this.config.customLiveStart;
|
|
@@ -1232,12 +1232,12 @@ var BilibiliNotifySub = class extends koishi.Service {
|
|
|
1232
1232
|
sub.customLiveMsg.customLive = this.config.customLive;
|
|
1233
1233
|
}
|
|
1234
1234
|
if (sub.customGuardBuy.enable) {
|
|
1235
|
-
if (sub.customGuardBuy.guardBuyMsg
|
|
1236
|
-
if (sub.customGuardBuy.captainImgUrl
|
|
1237
|
-
if (sub.customGuardBuy.supervisorImgUrl
|
|
1238
|
-
if (sub.customGuardBuy.governorImgUrl
|
|
1235
|
+
if (!sub.customGuardBuy.guardBuyMsg || !sub.customGuardBuy.guardBuyMsg.trim()) sub.customGuardBuy.guardBuyMsg = this.config.customGuardBuy.guardBuyMsg;
|
|
1236
|
+
if (!sub.customGuardBuy.captainImgUrl || !sub.customGuardBuy.captainImgUrl.trim()) sub.customGuardBuy.captainImgUrl = this.config.customGuardBuy.captainImgUrl;
|
|
1237
|
+
if (!sub.customGuardBuy.supervisorImgUrl || !sub.customGuardBuy.supervisorImgUrl.trim()) sub.customGuardBuy.supervisorImgUrl = this.config.customGuardBuy.supervisorImgUrl;
|
|
1238
|
+
if (!sub.customGuardBuy.governorImgUrl || !sub.customGuardBuy.governorImgUrl.trim()) sub.customGuardBuy.governorImgUrl = this.config.customGuardBuy.governorImgUrl;
|
|
1239
1239
|
} else if (this.config.customGuardBuy.enable) {
|
|
1240
|
-
sub.customGuardBuy.enable =
|
|
1240
|
+
sub.customGuardBuy.enable = false;
|
|
1241
1241
|
sub.customGuardBuy.guardBuyMsg = this.config.customGuardBuy.guardBuyMsg;
|
|
1242
1242
|
sub.customGuardBuy.captainImgUrl = this.config.customGuardBuy.captainImgUrl;
|
|
1243
1243
|
sub.customGuardBuy.supervisorImgUrl = this.config.customGuardBuy.supervisorImgUrl;
|
|
@@ -1259,20 +1259,20 @@ var BilibiliNotifySub = class extends koishi.Service {
|
|
|
1259
1259
|
const liveSummaryArr = [];
|
|
1260
1260
|
const spacialDanmakuArr = [];
|
|
1261
1261
|
const spacialUserEnterTheRoomArr = [];
|
|
1262
|
+
const conditions = [
|
|
1263
|
+
["dynamic", dynamicArr],
|
|
1264
|
+
["dynamicAtAll", dynamicAtAllArr],
|
|
1265
|
+
["live", liveArr],
|
|
1266
|
+
["liveAtAll", liveAtAllArr],
|
|
1267
|
+
["liveGuardBuy", liveGuardBuyArr],
|
|
1268
|
+
["superchat", superchatArr],
|
|
1269
|
+
["wordcloud", wordcloudArr],
|
|
1270
|
+
["liveSummary", liveSummaryArr],
|
|
1271
|
+
["spacialDanmaku", spacialDanmakuArr],
|
|
1272
|
+
["spacialUserEnterTheRoom", spacialUserEnterTheRoomArr]
|
|
1273
|
+
];
|
|
1262
1274
|
for (const platform of sub.target) for (const channel of platform.channelArr) {
|
|
1263
1275
|
const target = `${platform.platform}:${channel.channelId}`;
|
|
1264
|
-
const conditions = [
|
|
1265
|
-
["dynamic", dynamicArr],
|
|
1266
|
-
["dynamicAtAll", dynamicAtAllArr],
|
|
1267
|
-
["live", liveArr],
|
|
1268
|
-
["liveAtAll", liveAtAllArr],
|
|
1269
|
-
["liveGuardBuy", liveGuardBuyArr],
|
|
1270
|
-
["superchat", superchatArr],
|
|
1271
|
-
["wordcloud", wordcloudArr],
|
|
1272
|
-
["liveSummary", liveSummaryArr],
|
|
1273
|
-
["spacialDanmaku", spacialDanmakuArr],
|
|
1274
|
-
["spacialUserEnterTheRoom", spacialUserEnterTheRoomArr]
|
|
1275
|
-
];
|
|
1276
1276
|
for (const [key, arr] of conditions) if (channel[key]) arr.push(target);
|
|
1277
1277
|
}
|
|
1278
1278
|
pushArrMap.set(sub.uid, {
|
|
@@ -1283,7 +1283,9 @@ var BilibiliNotifySub = class extends koishi.Service {
|
|
|
1283
1283
|
liveSummaryArr,
|
|
1284
1284
|
liveGuardBuyArr,
|
|
1285
1285
|
superchatArr,
|
|
1286
|
-
wordcloudArr
|
|
1286
|
+
wordcloudArr,
|
|
1287
|
+
spacialDanmakuArr,
|
|
1288
|
+
spacialUserEnterTheRoomArr
|
|
1287
1289
|
});
|
|
1288
1290
|
}
|
|
1289
1291
|
this.ctx["bilibili-notify-push"].pushArrMap = pushArrMap;
|
|
@@ -1658,7 +1660,9 @@ var BilibiliNotifySub = class extends koishi.Service {
|
|
|
1658
1660
|
dynamic: sub.dynamic,
|
|
1659
1661
|
customCardStyle: sub.customCardStyle,
|
|
1660
1662
|
customLiveMsg: sub.customLiveMsg,
|
|
1661
|
-
customLiveSummary: sub.customLiveSummary
|
|
1663
|
+
customLiveSummary: sub.customLiveSummary,
|
|
1664
|
+
customSpecialDanmakuUsers: sub.customSpecialDanmakuUsers,
|
|
1665
|
+
customSpecialUsersEnterTheRoom: sub.customSpecialUsersEnterTheRoom
|
|
1662
1666
|
});
|
|
1663
1667
|
if (sub.live && !sub.roomid) {
|
|
1664
1668
|
this.logger.debug(`UID:${sub.uid} 请求了用户接口`);
|
|
@@ -1855,14 +1859,14 @@ var BilibiliNotifyPush = class extends koishi.Service {
|
|
|
1855
1859
|
}
|
|
1856
1860
|
const record = this.pushArrMap.get(uid);
|
|
1857
1861
|
if (!record) return;
|
|
1858
|
-
if (!(type === PushType.StartBroadcasting && record.liveAtAllArr?.length > 0 || type === PushType.Dynamic && (record.dynamicArr?.length > 0 || record.dynamicAtAllArr?.length > 0) || (type === PushType.Live || type === PushType.StartBroadcasting) && record.liveArr?.length > 0 || type === PushType.LiveGuardBuy && record.liveGuardBuyArr?.length > 0 || type === PushType.Superchat && record.superchatArr?.length > 0 || type === PushType.WordCloudAndLiveSummary && (record.wordcloudArr?.length > 0 || record.liveSummaryArr?.length > 0))) return;
|
|
1862
|
+
if (!(type === PushType.StartBroadcasting && record.liveAtAllArr?.length > 0 || type === PushType.Dynamic && (record.dynamicArr?.length > 0 || record.dynamicAtAllArr?.length > 0) || (type === PushType.Live || type === PushType.StartBroadcasting) && record.liveArr?.length > 0 || type === PushType.LiveGuardBuy && record.liveGuardBuyArr?.length > 0 || type === PushType.Superchat && record.superchatArr?.length > 0 || type === PushType.WordCloudAndLiveSummary && (record.wordcloudArr?.length > 0 || record.liveSummaryArr?.length > 0) || type === PushType.UserDanmakuMsg && record.spacialDanmakuArr?.length > 0 || type === PushType.UserActions && record.spacialUserEnterTheRoomArr?.length > 0)) return;
|
|
1859
1863
|
this.logger.info(`推送对象: ${uid}, 推送类型: ${PushTypeMsg[type]}`);
|
|
1860
|
-
if (type === PushType.StartBroadcasting
|
|
1864
|
+
if (type === PushType.StartBroadcasting) {
|
|
1861
1865
|
this.logger.debug(`推送给 @全体,对象列表:${record.liveAtAllArr}`);
|
|
1862
1866
|
const atAllArr = structuredClone(record.liveAtAllArr);
|
|
1863
1867
|
await withRetry(() => this.pushMessage(atAllArr, koishi.h.at("all")), 1);
|
|
1864
1868
|
}
|
|
1865
|
-
if (type === PushType.Dynamic
|
|
1869
|
+
if (type === PushType.Dynamic) {
|
|
1866
1870
|
if (record.dynamicAtAllArr?.length > 0) {
|
|
1867
1871
|
this.logger.debug(`推送动态给 @全体,对象列表:${record.dynamicAtAllArr}`);
|
|
1868
1872
|
const dynamicAtAllArr = structuredClone(record.dynamicAtAllArr);
|
|
@@ -1872,17 +1876,17 @@ var BilibiliNotifyPush = class extends koishi.Service {
|
|
|
1872
1876
|
const dynamicArr = structuredClone(record.dynamicArr);
|
|
1873
1877
|
await withRetry(() => this.pushMessage(dynamicArr, (0, koishi.h)("message", content)), 1);
|
|
1874
1878
|
}
|
|
1875
|
-
if (
|
|
1879
|
+
if (type === PushType.Live || type === PushType.StartBroadcasting) {
|
|
1876
1880
|
this.logger.debug(`推送直播,对象列表:${record.liveArr}`);
|
|
1877
1881
|
const liveArr = structuredClone(record.liveArr);
|
|
1878
1882
|
await withRetry(() => this.pushMessage(liveArr, (0, koishi.h)("message", content)), 1);
|
|
1879
1883
|
}
|
|
1880
|
-
if (type === PushType.LiveGuardBuy
|
|
1884
|
+
if (type === PushType.LiveGuardBuy) {
|
|
1881
1885
|
this.logger.debug(`推送直播守护购买消息,对象列表:${record.liveGuardBuyArr}`);
|
|
1882
1886
|
const liveGuardBuyArr = structuredClone(record.liveGuardBuyArr);
|
|
1883
1887
|
await withRetry(() => this.pushMessage(liveGuardBuyArr, (0, koishi.h)("message", content)), 1);
|
|
1884
1888
|
}
|
|
1885
|
-
if (type === PushType.Superchat
|
|
1889
|
+
if (type === PushType.Superchat) {
|
|
1886
1890
|
this.logger.debug(`推送 SC 消息,对象列表:${record.superchatArr}`);
|
|
1887
1891
|
const superchatArr = structuredClone(record.superchatArr);
|
|
1888
1892
|
await withRetry(() => this.pushMessage(superchatArr, (0, koishi.h)("message", content)), 1);
|
|
@@ -1907,6 +1911,16 @@ var BilibiliNotifyPush = class extends koishi.Service {
|
|
|
1907
1911
|
await withRetry(() => this.pushMessage(liveSummaryOnlyArr, (0, koishi.h)("message", content[1])), 1);
|
|
1908
1912
|
}
|
|
1909
1913
|
}
|
|
1914
|
+
if (type === PushType.UserDanmakuMsg) {
|
|
1915
|
+
this.logger.debug(`推送用户弹幕消息,对象列表:${record.spacialDanmakuArr}`);
|
|
1916
|
+
const spacialDanmakuArr = structuredClone(record.spacialDanmakuArr);
|
|
1917
|
+
await withRetry(() => this.pushMessage(spacialDanmakuArr, (0, koishi.h)("message", content)), 1);
|
|
1918
|
+
}
|
|
1919
|
+
if (type === PushType.UserActions) {
|
|
1920
|
+
this.logger.debug(`推送用户进入直播间消息,对象列表:${record.spacialUserEnterTheRoomArr}`);
|
|
1921
|
+
const spacialUserEnterTheRoomArr = structuredClone(record.spacialUserEnterTheRoomArr);
|
|
1922
|
+
await withRetry(() => this.pushMessage(spacialUserEnterTheRoomArr, (0, koishi.h)("message", content)), 1);
|
|
1923
|
+
}
|
|
1910
1924
|
}
|
|
1911
1925
|
};
|
|
1912
1926
|
(function(_BilibiliNotifyPush) {
|
package/lib/index.mjs
CHANGED
|
@@ -1193,9 +1193,9 @@ var BilibiliNotifySub = class extends Service {
|
|
|
1193
1193
|
const pushArrMap = /* @__PURE__ */ new Map();
|
|
1194
1194
|
for (const sub of Object.values(subs)) {
|
|
1195
1195
|
if (sub.customLiveMsg.enable) {
|
|
1196
|
-
if (sub.customLiveMsg.customLiveStart
|
|
1197
|
-
if (sub.customLiveMsg.customLiveEnd
|
|
1198
|
-
if (sub.customLiveMsg.customLive
|
|
1196
|
+
if (!sub.customLiveMsg.customLiveStart || !sub.customLiveMsg.customLiveStart.trim()) sub.customLiveMsg.customLiveStart = this.config.customLiveStart;
|
|
1197
|
+
if (!sub.customLiveMsg.customLiveEnd || !sub.customLiveMsg.customLiveEnd.trim()) sub.customLiveMsg.customLiveEnd = this.config.customLiveEnd;
|
|
1198
|
+
if (!sub.customLiveMsg.customLive || !sub.customLiveMsg.customLive.trim()) sub.customLiveMsg.customLive = this.config.customLive;
|
|
1199
1199
|
} else {
|
|
1200
1200
|
sub.customLiveMsg.enable = false;
|
|
1201
1201
|
sub.customLiveMsg.customLiveStart = this.config.customLiveStart;
|
|
@@ -1203,12 +1203,12 @@ var BilibiliNotifySub = class extends Service {
|
|
|
1203
1203
|
sub.customLiveMsg.customLive = this.config.customLive;
|
|
1204
1204
|
}
|
|
1205
1205
|
if (sub.customGuardBuy.enable) {
|
|
1206
|
-
if (sub.customGuardBuy.guardBuyMsg
|
|
1207
|
-
if (sub.customGuardBuy.captainImgUrl
|
|
1208
|
-
if (sub.customGuardBuy.supervisorImgUrl
|
|
1209
|
-
if (sub.customGuardBuy.governorImgUrl
|
|
1206
|
+
if (!sub.customGuardBuy.guardBuyMsg || !sub.customGuardBuy.guardBuyMsg.trim()) sub.customGuardBuy.guardBuyMsg = this.config.customGuardBuy.guardBuyMsg;
|
|
1207
|
+
if (!sub.customGuardBuy.captainImgUrl || !sub.customGuardBuy.captainImgUrl.trim()) sub.customGuardBuy.captainImgUrl = this.config.customGuardBuy.captainImgUrl;
|
|
1208
|
+
if (!sub.customGuardBuy.supervisorImgUrl || !sub.customGuardBuy.supervisorImgUrl.trim()) sub.customGuardBuy.supervisorImgUrl = this.config.customGuardBuy.supervisorImgUrl;
|
|
1209
|
+
if (!sub.customGuardBuy.governorImgUrl || !sub.customGuardBuy.governorImgUrl.trim()) sub.customGuardBuy.governorImgUrl = this.config.customGuardBuy.governorImgUrl;
|
|
1210
1210
|
} else if (this.config.customGuardBuy.enable) {
|
|
1211
|
-
sub.customGuardBuy.enable =
|
|
1211
|
+
sub.customGuardBuy.enable = false;
|
|
1212
1212
|
sub.customGuardBuy.guardBuyMsg = this.config.customGuardBuy.guardBuyMsg;
|
|
1213
1213
|
sub.customGuardBuy.captainImgUrl = this.config.customGuardBuy.captainImgUrl;
|
|
1214
1214
|
sub.customGuardBuy.supervisorImgUrl = this.config.customGuardBuy.supervisorImgUrl;
|
|
@@ -1230,20 +1230,20 @@ var BilibiliNotifySub = class extends Service {
|
|
|
1230
1230
|
const liveSummaryArr = [];
|
|
1231
1231
|
const spacialDanmakuArr = [];
|
|
1232
1232
|
const spacialUserEnterTheRoomArr = [];
|
|
1233
|
+
const conditions = [
|
|
1234
|
+
["dynamic", dynamicArr],
|
|
1235
|
+
["dynamicAtAll", dynamicAtAllArr],
|
|
1236
|
+
["live", liveArr],
|
|
1237
|
+
["liveAtAll", liveAtAllArr],
|
|
1238
|
+
["liveGuardBuy", liveGuardBuyArr],
|
|
1239
|
+
["superchat", superchatArr],
|
|
1240
|
+
["wordcloud", wordcloudArr],
|
|
1241
|
+
["liveSummary", liveSummaryArr],
|
|
1242
|
+
["spacialDanmaku", spacialDanmakuArr],
|
|
1243
|
+
["spacialUserEnterTheRoom", spacialUserEnterTheRoomArr]
|
|
1244
|
+
];
|
|
1233
1245
|
for (const platform of sub.target) for (const channel of platform.channelArr) {
|
|
1234
1246
|
const target = `${platform.platform}:${channel.channelId}`;
|
|
1235
|
-
const conditions = [
|
|
1236
|
-
["dynamic", dynamicArr],
|
|
1237
|
-
["dynamicAtAll", dynamicAtAllArr],
|
|
1238
|
-
["live", liveArr],
|
|
1239
|
-
["liveAtAll", liveAtAllArr],
|
|
1240
|
-
["liveGuardBuy", liveGuardBuyArr],
|
|
1241
|
-
["superchat", superchatArr],
|
|
1242
|
-
["wordcloud", wordcloudArr],
|
|
1243
|
-
["liveSummary", liveSummaryArr],
|
|
1244
|
-
["spacialDanmaku", spacialDanmakuArr],
|
|
1245
|
-
["spacialUserEnterTheRoom", spacialUserEnterTheRoomArr]
|
|
1246
|
-
];
|
|
1247
1247
|
for (const [key, arr] of conditions) if (channel[key]) arr.push(target);
|
|
1248
1248
|
}
|
|
1249
1249
|
pushArrMap.set(sub.uid, {
|
|
@@ -1254,7 +1254,9 @@ var BilibiliNotifySub = class extends Service {
|
|
|
1254
1254
|
liveSummaryArr,
|
|
1255
1255
|
liveGuardBuyArr,
|
|
1256
1256
|
superchatArr,
|
|
1257
|
-
wordcloudArr
|
|
1257
|
+
wordcloudArr,
|
|
1258
|
+
spacialDanmakuArr,
|
|
1259
|
+
spacialUserEnterTheRoomArr
|
|
1258
1260
|
});
|
|
1259
1261
|
}
|
|
1260
1262
|
this.ctx["bilibili-notify-push"].pushArrMap = pushArrMap;
|
|
@@ -1629,7 +1631,9 @@ var BilibiliNotifySub = class extends Service {
|
|
|
1629
1631
|
dynamic: sub.dynamic,
|
|
1630
1632
|
customCardStyle: sub.customCardStyle,
|
|
1631
1633
|
customLiveMsg: sub.customLiveMsg,
|
|
1632
|
-
customLiveSummary: sub.customLiveSummary
|
|
1634
|
+
customLiveSummary: sub.customLiveSummary,
|
|
1635
|
+
customSpecialDanmakuUsers: sub.customSpecialDanmakuUsers,
|
|
1636
|
+
customSpecialUsersEnterTheRoom: sub.customSpecialUsersEnterTheRoom
|
|
1633
1637
|
});
|
|
1634
1638
|
if (sub.live && !sub.roomid) {
|
|
1635
1639
|
this.logger.debug(`UID:${sub.uid} 请求了用户接口`);
|
|
@@ -1826,14 +1830,14 @@ var BilibiliNotifyPush = class extends Service {
|
|
|
1826
1830
|
}
|
|
1827
1831
|
const record = this.pushArrMap.get(uid);
|
|
1828
1832
|
if (!record) return;
|
|
1829
|
-
if (!(type === PushType.StartBroadcasting && record.liveAtAllArr?.length > 0 || type === PushType.Dynamic && (record.dynamicArr?.length > 0 || record.dynamicAtAllArr?.length > 0) || (type === PushType.Live || type === PushType.StartBroadcasting) && record.liveArr?.length > 0 || type === PushType.LiveGuardBuy && record.liveGuardBuyArr?.length > 0 || type === PushType.Superchat && record.superchatArr?.length > 0 || type === PushType.WordCloudAndLiveSummary && (record.wordcloudArr?.length > 0 || record.liveSummaryArr?.length > 0))) return;
|
|
1833
|
+
if (!(type === PushType.StartBroadcasting && record.liveAtAllArr?.length > 0 || type === PushType.Dynamic && (record.dynamicArr?.length > 0 || record.dynamicAtAllArr?.length > 0) || (type === PushType.Live || type === PushType.StartBroadcasting) && record.liveArr?.length > 0 || type === PushType.LiveGuardBuy && record.liveGuardBuyArr?.length > 0 || type === PushType.Superchat && record.superchatArr?.length > 0 || type === PushType.WordCloudAndLiveSummary && (record.wordcloudArr?.length > 0 || record.liveSummaryArr?.length > 0) || type === PushType.UserDanmakuMsg && record.spacialDanmakuArr?.length > 0 || type === PushType.UserActions && record.spacialUserEnterTheRoomArr?.length > 0)) return;
|
|
1830
1834
|
this.logger.info(`推送对象: ${uid}, 推送类型: ${PushTypeMsg[type]}`);
|
|
1831
|
-
if (type === PushType.StartBroadcasting
|
|
1835
|
+
if (type === PushType.StartBroadcasting) {
|
|
1832
1836
|
this.logger.debug(`推送给 @全体,对象列表:${record.liveAtAllArr}`);
|
|
1833
1837
|
const atAllArr = structuredClone(record.liveAtAllArr);
|
|
1834
1838
|
await withRetry(() => this.pushMessage(atAllArr, h.at("all")), 1);
|
|
1835
1839
|
}
|
|
1836
|
-
if (type === PushType.Dynamic
|
|
1840
|
+
if (type === PushType.Dynamic) {
|
|
1837
1841
|
if (record.dynamicAtAllArr?.length > 0) {
|
|
1838
1842
|
this.logger.debug(`推送动态给 @全体,对象列表:${record.dynamicAtAllArr}`);
|
|
1839
1843
|
const dynamicAtAllArr = structuredClone(record.dynamicAtAllArr);
|
|
@@ -1843,17 +1847,17 @@ var BilibiliNotifyPush = class extends Service {
|
|
|
1843
1847
|
const dynamicArr = structuredClone(record.dynamicArr);
|
|
1844
1848
|
await withRetry(() => this.pushMessage(dynamicArr, h("message", content)), 1);
|
|
1845
1849
|
}
|
|
1846
|
-
if (
|
|
1850
|
+
if (type === PushType.Live || type === PushType.StartBroadcasting) {
|
|
1847
1851
|
this.logger.debug(`推送直播,对象列表:${record.liveArr}`);
|
|
1848
1852
|
const liveArr = structuredClone(record.liveArr);
|
|
1849
1853
|
await withRetry(() => this.pushMessage(liveArr, h("message", content)), 1);
|
|
1850
1854
|
}
|
|
1851
|
-
if (type === PushType.LiveGuardBuy
|
|
1855
|
+
if (type === PushType.LiveGuardBuy) {
|
|
1852
1856
|
this.logger.debug(`推送直播守护购买消息,对象列表:${record.liveGuardBuyArr}`);
|
|
1853
1857
|
const liveGuardBuyArr = structuredClone(record.liveGuardBuyArr);
|
|
1854
1858
|
await withRetry(() => this.pushMessage(liveGuardBuyArr, h("message", content)), 1);
|
|
1855
1859
|
}
|
|
1856
|
-
if (type === PushType.Superchat
|
|
1860
|
+
if (type === PushType.Superchat) {
|
|
1857
1861
|
this.logger.debug(`推送 SC 消息,对象列表:${record.superchatArr}`);
|
|
1858
1862
|
const superchatArr = structuredClone(record.superchatArr);
|
|
1859
1863
|
await withRetry(() => this.pushMessage(superchatArr, h("message", content)), 1);
|
|
@@ -1878,6 +1882,16 @@ var BilibiliNotifyPush = class extends Service {
|
|
|
1878
1882
|
await withRetry(() => this.pushMessage(liveSummaryOnlyArr, h("message", content[1])), 1);
|
|
1879
1883
|
}
|
|
1880
1884
|
}
|
|
1885
|
+
if (type === PushType.UserDanmakuMsg) {
|
|
1886
|
+
this.logger.debug(`推送用户弹幕消息,对象列表:${record.spacialDanmakuArr}`);
|
|
1887
|
+
const spacialDanmakuArr = structuredClone(record.spacialDanmakuArr);
|
|
1888
|
+
await withRetry(() => this.pushMessage(spacialDanmakuArr, h("message", content)), 1);
|
|
1889
|
+
}
|
|
1890
|
+
if (type === PushType.UserActions) {
|
|
1891
|
+
this.logger.debug(`推送用户进入直播间消息,对象列表:${record.spacialUserEnterTheRoomArr}`);
|
|
1892
|
+
const spacialUserEnterTheRoomArr = structuredClone(record.spacialUserEnterTheRoomArr);
|
|
1893
|
+
await withRetry(() => this.pushMessage(spacialUserEnterTheRoomArr, h("message", content)), 1);
|
|
1894
|
+
}
|
|
1881
1895
|
}
|
|
1882
1896
|
};
|
|
1883
1897
|
(function(_BilibiliNotifyPush) {
|