koishi-plugin-bilibili-notify 3.3.7 → 3.3.8-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.js +30 -34
- package/lib/index.mjs +30 -34
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -337,11 +337,10 @@ const stopwords = new Set([
|
|
|
337
337
|
"之前",
|
|
338
338
|
"某天"
|
|
339
339
|
]);
|
|
340
|
-
var stop_words_default = stopwords;
|
|
341
340
|
|
|
342
341
|
//#endregion
|
|
343
342
|
//#region src/command_register.ts
|
|
344
|
-
var ComRegister = class {
|
|
343
|
+
var ComRegister$1 = class {
|
|
345
344
|
static inject = [
|
|
346
345
|
"bilibili-notify",
|
|
347
346
|
"bilibili-notify-api",
|
|
@@ -711,11 +710,11 @@ var ComRegister = class {
|
|
|
711
710
|
}
|
|
712
711
|
mergeStopWords(stopWordsStr) {
|
|
713
712
|
if (!stopWordsStr || stopWordsStr.trim() === "") {
|
|
714
|
-
this.stopwords = new Set(
|
|
713
|
+
this.stopwords = new Set(stopwords);
|
|
715
714
|
return;
|
|
716
715
|
}
|
|
717
716
|
const additionalStopWords = stopWordsStr.split(",").map((word) => word.trim()).filter((word) => word !== "");
|
|
718
|
-
this.stopwords = new Set([...
|
|
717
|
+
this.stopwords = new Set([...stopwords, ...additionalStopWords]);
|
|
719
718
|
}
|
|
720
719
|
initManagerAfterLoadSub() {
|
|
721
720
|
for (const [uid, sub] of this.subManager) {
|
|
@@ -885,10 +884,14 @@ var ComRegister = class {
|
|
|
885
884
|
return;
|
|
886
885
|
}
|
|
887
886
|
if (bots[botIndex].status !== koishi.Universal.Status.ONLINE) {
|
|
887
|
+
if (retry >= 3e3 * 2 * 2 * 2 * 2 * 2) {
|
|
888
|
+
this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,已重试5次,放弃推送`);
|
|
889
|
+
await this.sendPrivateMsg(`${platform} 机器人未初始化完毕,无法进行推送,已重试5次,放弃推送`);
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
888
892
|
this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,${retry / 1e3}秒后重试`);
|
|
889
|
-
this.ctx.
|
|
890
|
-
|
|
891
|
-
}, retry);
|
|
893
|
+
await this.ctx.sleep(retry);
|
|
894
|
+
await this.pushMessage(targets, content, retry * 2);
|
|
892
895
|
return;
|
|
893
896
|
}
|
|
894
897
|
try {
|
|
@@ -1170,9 +1173,11 @@ var ComRegister = class {
|
|
|
1170
1173
|
async useLiveRoomInfo(roomId) {
|
|
1171
1174
|
const data = await withRetry(async () => await this.ctx["bilibili-notify-api"].getLiveRoomInfo(roomId)).then((content) => content.data).catch((e) => {
|
|
1172
1175
|
this.logger.error(`liveDetect getLiveRoomInfo 发生了错误,错误为:${e.message}`);
|
|
1173
|
-
return false;
|
|
1174
1176
|
});
|
|
1175
|
-
if (!data)
|
|
1177
|
+
if (!data) {
|
|
1178
|
+
await this.sendPrivateMsgAndStopService();
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1176
1181
|
return data;
|
|
1177
1182
|
}
|
|
1178
1183
|
async sendLiveNotifyCard(liveType, followerDisplay, liveInfo, uid, liveNotifyMsg) {
|
|
@@ -1261,7 +1266,7 @@ var ComRegister = class {
|
|
|
1261
1266
|
flag = false;
|
|
1262
1267
|
return flag;
|
|
1263
1268
|
}
|
|
1264
|
-
masterInfo = await this.useMasterInfo(liveRoomInfo.uid, masterInfo, liveType).catch(() => {
|
|
1269
|
+
masterInfo = await this.useMasterInfo(liveRoomInfo.uid.toString(), masterInfo, liveType).catch(() => {
|
|
1265
1270
|
flag = false;
|
|
1266
1271
|
return null;
|
|
1267
1272
|
});
|
|
@@ -1298,10 +1303,6 @@ var ComRegister = class {
|
|
|
1298
1303
|
const now = Date.now();
|
|
1299
1304
|
if (now - lastLiveStart < LIVE_EVENT_COOLDOWN) {
|
|
1300
1305
|
this.logger.warn(`[${sub.roomid}] 开播事件冷却期内被忽略`);
|
|
1301
|
-
if (!liveTime) {
|
|
1302
|
-
await useMasterAndLiveRoomInfo(LiveType.StartBroadcasting);
|
|
1303
|
-
liveTime = liveRoomInfo?.live_time || Date.now();
|
|
1304
|
-
}
|
|
1305
1306
|
return;
|
|
1306
1307
|
}
|
|
1307
1308
|
lastLiveStart = now;
|
|
@@ -1315,7 +1316,7 @@ var ComRegister = class {
|
|
|
1315
1316
|
await this.sendPrivateMsg("获取直播间信息失败,推送直播开播卡片失败!");
|
|
1316
1317
|
return await this.sendPrivateMsgAndStopService();
|
|
1317
1318
|
}
|
|
1318
|
-
liveTime = liveRoomInfo?.live_time ||
|
|
1319
|
+
liveTime = liveRoomInfo?.live_time || luxon.DateTime.now().toFormat("yyyy-MM-dd HH:mm:ss");
|
|
1319
1320
|
const diffTime = await this.ctx["bilibili-notify-generate-img"].getTimeDifference(liveTime);
|
|
1320
1321
|
const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
|
|
1321
1322
|
const liveStartMsg = liveMsgObj.customLiveStart.replace("-name", masterInfo.username).replace("-time", diffTime).replace("-follower", follower).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
@@ -1335,7 +1336,7 @@ var ComRegister = class {
|
|
|
1335
1336
|
this.logger.warn(`[${sub.roomid}] 下播事件冷却期内被忽略`);
|
|
1336
1337
|
if (!liveTime) {
|
|
1337
1338
|
await useMasterAndLiveRoomInfo(LiveType.StopBroadcast);
|
|
1338
|
-
liveTime = liveRoomInfo?.live_time ||
|
|
1339
|
+
liveTime = liveRoomInfo?.live_time || luxon.DateTime.now().toFormat("yyyy-MM-dd HH:mm:ss");
|
|
1339
1340
|
}
|
|
1340
1341
|
return;
|
|
1341
1342
|
}
|
|
@@ -1345,11 +1346,7 @@ var ComRegister = class {
|
|
|
1345
1346
|
return;
|
|
1346
1347
|
}
|
|
1347
1348
|
liveStatus = false;
|
|
1348
|
-
|
|
1349
|
-
await this.sendPrivateMsg("获取直播间信息失败,推送直播下播卡片失败!");
|
|
1350
|
-
return await this.sendPrivateMsgAndStopService();
|
|
1351
|
-
}
|
|
1352
|
-
liveTime = liveTime || liveRoomInfo?.live_time || Date.now();
|
|
1349
|
+
liveTime = liveRoomInfo?.live_time || luxon.DateTime.now().toFormat("yyyy-MM-dd HH:mm:ss");
|
|
1353
1350
|
const diffTime = await this.ctx["bilibili-notify-generate-img"].getTimeDifference(liveTime);
|
|
1354
1351
|
const followerChange = (() => {
|
|
1355
1352
|
const liveFollowerChangeNum = masterInfo.liveFollowerChange;
|
|
@@ -1811,8 +1808,8 @@ var ComRegister = class {
|
|
|
1811
1808
|
}),
|
|
1812
1809
|
dynamicDebugMode: koishi.Schema.boolean().required()
|
|
1813
1810
|
});
|
|
1814
|
-
})(ComRegister || (ComRegister = {}));
|
|
1815
|
-
var
|
|
1811
|
+
})(ComRegister$1 || (ComRegister$1 = {}));
|
|
1812
|
+
var ComRegister = ComRegister$1;
|
|
1816
1813
|
|
|
1817
1814
|
//#endregion
|
|
1818
1815
|
//#region src/database.ts
|
|
@@ -1848,7 +1845,7 @@ const DYNAMIC_TYPE_COURSES_SEASON = "DYNAMIC_TYPE_COURSES_SEASON";
|
|
|
1848
1845
|
const DYNAMIC_TYPE_LIVE_RCMD = "DYNAMIC_TYPE_LIVE_RCMD";
|
|
1849
1846
|
const DYNAMIC_TYPE_UGC_SEASON = "DYNAMIC_TYPE_UGC_SEASON";
|
|
1850
1847
|
const ADDITIONAL_TYPE_RESERVE = "ADDITIONAL_TYPE_RESERVE";
|
|
1851
|
-
var GenerateImg = class extends koishi.Service {
|
|
1848
|
+
var GenerateImg$1 = class extends koishi.Service {
|
|
1852
1849
|
static inject = ["puppeteer"];
|
|
1853
1850
|
giConfig;
|
|
1854
1851
|
constructor(ctx, config) {
|
|
@@ -3312,8 +3309,8 @@ var GenerateImg = class extends koishi.Service {
|
|
|
3312
3309
|
hideDesc: koishi.Schema.boolean(),
|
|
3313
3310
|
followerDisplay: koishi.Schema.boolean()
|
|
3314
3311
|
});
|
|
3315
|
-
})(GenerateImg || (GenerateImg = {}));
|
|
3316
|
-
var
|
|
3312
|
+
})(GenerateImg$1 || (GenerateImg$1 = {}));
|
|
3313
|
+
var GenerateImg = GenerateImg$1;
|
|
3317
3314
|
|
|
3318
3315
|
//#endregion
|
|
3319
3316
|
//#region src/bili_api.ts
|
|
@@ -3408,7 +3405,7 @@ const COPY_USER_TO_GROUP = "https://api.bilibili.com/x/relation/tags/copyUsers";
|
|
|
3408
3405
|
const GET_RELATION_GROUP_DETAIL = "https://api.bilibili.com/x/relation/tag";
|
|
3409
3406
|
const GET_LIVE_ROOM_INFO_STREAM_KEY = "https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo";
|
|
3410
3407
|
const GET_LIVE_ROOMS_INFO = "https://api.live.bilibili.com/room/v1/Room/get_status_info_by_uids";
|
|
3411
|
-
var BiliAPI = class extends koishi.Service {
|
|
3408
|
+
var BiliAPI$1 = class extends koishi.Service {
|
|
3412
3409
|
static inject = ["database", "notifier"];
|
|
3413
3410
|
jar;
|
|
3414
3411
|
client;
|
|
@@ -4083,8 +4080,8 @@ var BiliAPI = class extends koishi.Service {
|
|
|
4083
4080
|
userAgent: koishi.Schema.string(),
|
|
4084
4081
|
key: koishi.Schema.string().pattern(/^[0-9a-f]{32}$/).required()
|
|
4085
4082
|
});
|
|
4086
|
-
})(BiliAPI || (BiliAPI = {}));
|
|
4087
|
-
var
|
|
4083
|
+
})(BiliAPI$1 || (BiliAPI$1 = {}));
|
|
4084
|
+
var BiliAPI = BiliAPI$1;
|
|
4088
4085
|
|
|
4089
4086
|
//#endregion
|
|
4090
4087
|
//#region src/bili_live.ts
|
|
@@ -4117,7 +4114,6 @@ var BLive = class extends koishi.Service {
|
|
|
4117
4114
|
this.logger.warn(`${roomId}直播间连接未成功关闭`);
|
|
4118
4115
|
}
|
|
4119
4116
|
};
|
|
4120
|
-
var bili_live_default = BLive;
|
|
4121
4117
|
|
|
4122
4118
|
//#endregion
|
|
4123
4119
|
//#region src/index.ts
|
|
@@ -4159,11 +4155,11 @@ var ServerManager = class extends koishi.Service {
|
|
|
4159
4155
|
registerPlugin = () => {
|
|
4160
4156
|
if (this.servers.length !== 0) return false;
|
|
4161
4157
|
try {
|
|
4162
|
-
const ba = this.ctx.plugin(
|
|
4158
|
+
const ba = this.ctx.plugin(BiliAPI, {
|
|
4163
4159
|
userAgent: globalConfig.userAgent,
|
|
4164
4160
|
key: globalConfig.key
|
|
4165
4161
|
});
|
|
4166
|
-
const gi = this.ctx.plugin(
|
|
4162
|
+
const gi = this.ctx.plugin(GenerateImg, {
|
|
4167
4163
|
filter: globalConfig.filter,
|
|
4168
4164
|
removeBorder: globalConfig.removeBorder,
|
|
4169
4165
|
cardColorStart: globalConfig.cardColorStart,
|
|
@@ -4175,7 +4171,7 @@ var ServerManager = class extends koishi.Service {
|
|
|
4175
4171
|
font: globalConfig.font,
|
|
4176
4172
|
followerDisplay: globalConfig.followerDisplay
|
|
4177
4173
|
});
|
|
4178
|
-
const cr = this.ctx.plugin(
|
|
4174
|
+
const cr = this.ctx.plugin(ComRegister, {
|
|
4179
4175
|
advancedSub: globalConfig.advancedSub,
|
|
4180
4176
|
subs: globalConfig.subs,
|
|
4181
4177
|
master: globalConfig.master,
|
|
@@ -4194,7 +4190,7 @@ var ServerManager = class extends koishi.Service {
|
|
|
4194
4190
|
filter: globalConfig.filter,
|
|
4195
4191
|
dynamicDebugMode: globalConfig.dynamicDebugMode
|
|
4196
4192
|
});
|
|
4197
|
-
const bl = this.ctx.plugin(
|
|
4193
|
+
const bl = this.ctx.plugin(BLive);
|
|
4198
4194
|
this.servers.push(ba);
|
|
4199
4195
|
this.servers.push(bl);
|
|
4200
4196
|
this.servers.push(gi);
|
package/lib/index.mjs
CHANGED
|
@@ -319,11 +319,10 @@ const stopwords = new Set([
|
|
|
319
319
|
"之前",
|
|
320
320
|
"某天"
|
|
321
321
|
]);
|
|
322
|
-
var stop_words_default = stopwords;
|
|
323
322
|
|
|
324
323
|
//#endregion
|
|
325
324
|
//#region src/command_register.ts
|
|
326
|
-
var ComRegister = class {
|
|
325
|
+
var ComRegister$1 = class {
|
|
327
326
|
static inject = [
|
|
328
327
|
"bilibili-notify",
|
|
329
328
|
"bilibili-notify-api",
|
|
@@ -693,11 +692,11 @@ var ComRegister = class {
|
|
|
693
692
|
}
|
|
694
693
|
mergeStopWords(stopWordsStr) {
|
|
695
694
|
if (!stopWordsStr || stopWordsStr.trim() === "") {
|
|
696
|
-
this.stopwords = new Set(
|
|
695
|
+
this.stopwords = new Set(stopwords);
|
|
697
696
|
return;
|
|
698
697
|
}
|
|
699
698
|
const additionalStopWords = stopWordsStr.split(",").map((word) => word.trim()).filter((word) => word !== "");
|
|
700
|
-
this.stopwords = new Set([...
|
|
699
|
+
this.stopwords = new Set([...stopwords, ...additionalStopWords]);
|
|
701
700
|
}
|
|
702
701
|
initManagerAfterLoadSub() {
|
|
703
702
|
for (const [uid, sub] of this.subManager) {
|
|
@@ -867,10 +866,14 @@ var ComRegister = class {
|
|
|
867
866
|
return;
|
|
868
867
|
}
|
|
869
868
|
if (bots[botIndex].status !== Universal.Status.ONLINE) {
|
|
869
|
+
if (retry >= 3e3 * 2 * 2 * 2 * 2 * 2) {
|
|
870
|
+
this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,已重试5次,放弃推送`);
|
|
871
|
+
await this.sendPrivateMsg(`${platform} 机器人未初始化完毕,无法进行推送,已重试5次,放弃推送`);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
870
874
|
this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,${retry / 1e3}秒后重试`);
|
|
871
|
-
this.ctx.
|
|
872
|
-
|
|
873
|
-
}, retry);
|
|
875
|
+
await this.ctx.sleep(retry);
|
|
876
|
+
await this.pushMessage(targets, content, retry * 2);
|
|
874
877
|
return;
|
|
875
878
|
}
|
|
876
879
|
try {
|
|
@@ -1152,9 +1155,11 @@ var ComRegister = class {
|
|
|
1152
1155
|
async useLiveRoomInfo(roomId) {
|
|
1153
1156
|
const data = await withRetry(async () => await this.ctx["bilibili-notify-api"].getLiveRoomInfo(roomId)).then((content) => content.data).catch((e) => {
|
|
1154
1157
|
this.logger.error(`liveDetect getLiveRoomInfo 发生了错误,错误为:${e.message}`);
|
|
1155
|
-
return false;
|
|
1156
1158
|
});
|
|
1157
|
-
if (!data)
|
|
1159
|
+
if (!data) {
|
|
1160
|
+
await this.sendPrivateMsgAndStopService();
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1158
1163
|
return data;
|
|
1159
1164
|
}
|
|
1160
1165
|
async sendLiveNotifyCard(liveType, followerDisplay, liveInfo, uid, liveNotifyMsg) {
|
|
@@ -1243,7 +1248,7 @@ var ComRegister = class {
|
|
|
1243
1248
|
flag = false;
|
|
1244
1249
|
return flag;
|
|
1245
1250
|
}
|
|
1246
|
-
masterInfo = await this.useMasterInfo(liveRoomInfo.uid, masterInfo, liveType).catch(() => {
|
|
1251
|
+
masterInfo = await this.useMasterInfo(liveRoomInfo.uid.toString(), masterInfo, liveType).catch(() => {
|
|
1247
1252
|
flag = false;
|
|
1248
1253
|
return null;
|
|
1249
1254
|
});
|
|
@@ -1280,10 +1285,6 @@ var ComRegister = class {
|
|
|
1280
1285
|
const now = Date.now();
|
|
1281
1286
|
if (now - lastLiveStart < LIVE_EVENT_COOLDOWN) {
|
|
1282
1287
|
this.logger.warn(`[${sub.roomid}] 开播事件冷却期内被忽略`);
|
|
1283
|
-
if (!liveTime) {
|
|
1284
|
-
await useMasterAndLiveRoomInfo(LiveType.StartBroadcasting);
|
|
1285
|
-
liveTime = liveRoomInfo?.live_time || Date.now();
|
|
1286
|
-
}
|
|
1287
1288
|
return;
|
|
1288
1289
|
}
|
|
1289
1290
|
lastLiveStart = now;
|
|
@@ -1297,7 +1298,7 @@ var ComRegister = class {
|
|
|
1297
1298
|
await this.sendPrivateMsg("获取直播间信息失败,推送直播开播卡片失败!");
|
|
1298
1299
|
return await this.sendPrivateMsgAndStopService();
|
|
1299
1300
|
}
|
|
1300
|
-
liveTime = liveRoomInfo?.live_time ||
|
|
1301
|
+
liveTime = liveRoomInfo?.live_time || DateTime.now().toFormat("yyyy-MM-dd HH:mm:ss");
|
|
1301
1302
|
const diffTime = await this.ctx["bilibili-notify-generate-img"].getTimeDifference(liveTime);
|
|
1302
1303
|
const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
|
|
1303
1304
|
const liveStartMsg = liveMsgObj.customLiveStart.replace("-name", masterInfo.username).replace("-time", diffTime).replace("-follower", follower).replaceAll("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
@@ -1317,7 +1318,7 @@ var ComRegister = class {
|
|
|
1317
1318
|
this.logger.warn(`[${sub.roomid}] 下播事件冷却期内被忽略`);
|
|
1318
1319
|
if (!liveTime) {
|
|
1319
1320
|
await useMasterAndLiveRoomInfo(LiveType.StopBroadcast);
|
|
1320
|
-
liveTime = liveRoomInfo?.live_time ||
|
|
1321
|
+
liveTime = liveRoomInfo?.live_time || DateTime.now().toFormat("yyyy-MM-dd HH:mm:ss");
|
|
1321
1322
|
}
|
|
1322
1323
|
return;
|
|
1323
1324
|
}
|
|
@@ -1327,11 +1328,7 @@ var ComRegister = class {
|
|
|
1327
1328
|
return;
|
|
1328
1329
|
}
|
|
1329
1330
|
liveStatus = false;
|
|
1330
|
-
|
|
1331
|
-
await this.sendPrivateMsg("获取直播间信息失败,推送直播下播卡片失败!");
|
|
1332
|
-
return await this.sendPrivateMsgAndStopService();
|
|
1333
|
-
}
|
|
1334
|
-
liveTime = liveTime || liveRoomInfo?.live_time || Date.now();
|
|
1331
|
+
liveTime = liveRoomInfo?.live_time || DateTime.now().toFormat("yyyy-MM-dd HH:mm:ss");
|
|
1335
1332
|
const diffTime = await this.ctx["bilibili-notify-generate-img"].getTimeDifference(liveTime);
|
|
1336
1333
|
const followerChange = (() => {
|
|
1337
1334
|
const liveFollowerChangeNum = masterInfo.liveFollowerChange;
|
|
@@ -1793,8 +1790,8 @@ var ComRegister = class {
|
|
|
1793
1790
|
}),
|
|
1794
1791
|
dynamicDebugMode: Schema.boolean().required()
|
|
1795
1792
|
});
|
|
1796
|
-
})(ComRegister || (ComRegister = {}));
|
|
1797
|
-
var
|
|
1793
|
+
})(ComRegister$1 || (ComRegister$1 = {}));
|
|
1794
|
+
var ComRegister = ComRegister$1;
|
|
1798
1795
|
|
|
1799
1796
|
//#endregion
|
|
1800
1797
|
//#region src/database.ts
|
|
@@ -1830,7 +1827,7 @@ const DYNAMIC_TYPE_COURSES_SEASON = "DYNAMIC_TYPE_COURSES_SEASON";
|
|
|
1830
1827
|
const DYNAMIC_TYPE_LIVE_RCMD = "DYNAMIC_TYPE_LIVE_RCMD";
|
|
1831
1828
|
const DYNAMIC_TYPE_UGC_SEASON = "DYNAMIC_TYPE_UGC_SEASON";
|
|
1832
1829
|
const ADDITIONAL_TYPE_RESERVE = "ADDITIONAL_TYPE_RESERVE";
|
|
1833
|
-
var GenerateImg = class extends Service {
|
|
1830
|
+
var GenerateImg$1 = class extends Service {
|
|
1834
1831
|
static inject = ["puppeteer"];
|
|
1835
1832
|
giConfig;
|
|
1836
1833
|
constructor(ctx, config) {
|
|
@@ -3294,8 +3291,8 @@ var GenerateImg = class extends Service {
|
|
|
3294
3291
|
hideDesc: Schema.boolean(),
|
|
3295
3292
|
followerDisplay: Schema.boolean()
|
|
3296
3293
|
});
|
|
3297
|
-
})(GenerateImg || (GenerateImg = {}));
|
|
3298
|
-
var
|
|
3294
|
+
})(GenerateImg$1 || (GenerateImg$1 = {}));
|
|
3295
|
+
var GenerateImg = GenerateImg$1;
|
|
3299
3296
|
|
|
3300
3297
|
//#endregion
|
|
3301
3298
|
//#region src/bili_api.ts
|
|
@@ -3390,7 +3387,7 @@ const COPY_USER_TO_GROUP = "https://api.bilibili.com/x/relation/tags/copyUsers";
|
|
|
3390
3387
|
const GET_RELATION_GROUP_DETAIL = "https://api.bilibili.com/x/relation/tag";
|
|
3391
3388
|
const GET_LIVE_ROOM_INFO_STREAM_KEY = "https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo";
|
|
3392
3389
|
const GET_LIVE_ROOMS_INFO = "https://api.live.bilibili.com/room/v1/Room/get_status_info_by_uids";
|
|
3393
|
-
var BiliAPI = class extends Service {
|
|
3390
|
+
var BiliAPI$1 = class extends Service {
|
|
3394
3391
|
static inject = ["database", "notifier"];
|
|
3395
3392
|
jar;
|
|
3396
3393
|
client;
|
|
@@ -4065,8 +4062,8 @@ var BiliAPI = class extends Service {
|
|
|
4065
4062
|
userAgent: Schema.string(),
|
|
4066
4063
|
key: Schema.string().pattern(/^[0-9a-f]{32}$/).required()
|
|
4067
4064
|
});
|
|
4068
|
-
})(BiliAPI || (BiliAPI = {}));
|
|
4069
|
-
var
|
|
4065
|
+
})(BiliAPI$1 || (BiliAPI$1 = {}));
|
|
4066
|
+
var BiliAPI = BiliAPI$1;
|
|
4070
4067
|
|
|
4071
4068
|
//#endregion
|
|
4072
4069
|
//#region src/bili_live.ts
|
|
@@ -4099,7 +4096,6 @@ var BLive = class extends Service {
|
|
|
4099
4096
|
this.logger.warn(`${roomId}直播间连接未成功关闭`);
|
|
4100
4097
|
}
|
|
4101
4098
|
};
|
|
4102
|
-
var bili_live_default = BLive;
|
|
4103
4099
|
|
|
4104
4100
|
//#endregion
|
|
4105
4101
|
//#region src/index.ts
|
|
@@ -4141,11 +4137,11 @@ var ServerManager = class extends Service {
|
|
|
4141
4137
|
registerPlugin = () => {
|
|
4142
4138
|
if (this.servers.length !== 0) return false;
|
|
4143
4139
|
try {
|
|
4144
|
-
const ba = this.ctx.plugin(
|
|
4140
|
+
const ba = this.ctx.plugin(BiliAPI, {
|
|
4145
4141
|
userAgent: globalConfig.userAgent,
|
|
4146
4142
|
key: globalConfig.key
|
|
4147
4143
|
});
|
|
4148
|
-
const gi = this.ctx.plugin(
|
|
4144
|
+
const gi = this.ctx.plugin(GenerateImg, {
|
|
4149
4145
|
filter: globalConfig.filter,
|
|
4150
4146
|
removeBorder: globalConfig.removeBorder,
|
|
4151
4147
|
cardColorStart: globalConfig.cardColorStart,
|
|
@@ -4157,7 +4153,7 @@ var ServerManager = class extends Service {
|
|
|
4157
4153
|
font: globalConfig.font,
|
|
4158
4154
|
followerDisplay: globalConfig.followerDisplay
|
|
4159
4155
|
});
|
|
4160
|
-
const cr = this.ctx.plugin(
|
|
4156
|
+
const cr = this.ctx.plugin(ComRegister, {
|
|
4161
4157
|
advancedSub: globalConfig.advancedSub,
|
|
4162
4158
|
subs: globalConfig.subs,
|
|
4163
4159
|
master: globalConfig.master,
|
|
@@ -4176,7 +4172,7 @@ var ServerManager = class extends Service {
|
|
|
4176
4172
|
filter: globalConfig.filter,
|
|
4177
4173
|
dynamicDebugMode: globalConfig.dynamicDebugMode
|
|
4178
4174
|
});
|
|
4179
|
-
const bl = this.ctx.plugin(
|
|
4175
|
+
const bl = this.ctx.plugin(BLive);
|
|
4180
4176
|
this.servers.push(ba);
|
|
4181
4177
|
this.servers.push(bl);
|
|
4182
4178
|
this.servers.push(gi);
|