koishi-plugin-bilibili-notify 1.2.3-beta.1 → 1.2.3-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/biliAPI.js +12 -15
- package/lib/comRegister.js +99 -43
- package/lib/generateImg.js +31 -30
- package/package.json +1 -1
- package/readme.md +4 -1
package/lib/biliAPI.js
CHANGED
|
@@ -265,8 +265,6 @@ class BiliAPI extends koishi_1.Service {
|
|
|
265
265
|
}, 3600000);
|
|
266
266
|
}
|
|
267
267
|
async checkIfTokenNeedRefresh(refreshToken, csrf, times = 3) {
|
|
268
|
-
// 定义数据
|
|
269
|
-
let data;
|
|
270
268
|
// 定义方法
|
|
271
269
|
const notifyAndError = (info) => {
|
|
272
270
|
// 设置控制台通知
|
|
@@ -283,22 +281,21 @@ class BiliAPI extends koishi_1.Service {
|
|
|
283
281
|
};
|
|
284
282
|
// 尝试获取Cookieinfo
|
|
285
283
|
try {
|
|
286
|
-
const { data
|
|
287
|
-
|
|
284
|
+
const { data } = await this.getCookieInfo(refreshToken);
|
|
285
|
+
// 不需要刷新,直接返回
|
|
286
|
+
if (!data.refresh)
|
|
287
|
+
return;
|
|
288
288
|
}
|
|
289
289
|
catch (e) {
|
|
290
|
-
//
|
|
291
|
-
if (times
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
|
|
290
|
+
// 发送三次仍网络错误则直接刷新cookie
|
|
291
|
+
if (times >= 1) {
|
|
292
|
+
// 等待3秒再次尝试
|
|
293
|
+
this.ctx.setTimeout(() => {
|
|
294
|
+
this.checkIfTokenNeedRefresh(refreshToken, csrf, times - 1);
|
|
295
|
+
}, 3000);
|
|
296
|
+
}
|
|
297
|
+
// 如果请求失败,有可能是404,直接刷新cookie
|
|
298
298
|
}
|
|
299
|
-
// 不需要刷新,直接返回
|
|
300
|
-
if (!data.refresh)
|
|
301
|
-
return;
|
|
302
299
|
// 定义Key
|
|
303
300
|
const publicKey = await crypto.subtle.importKey("jwk", {
|
|
304
301
|
kty: "RSA",
|
package/lib/comRegister.js
CHANGED
|
@@ -159,7 +159,7 @@ class ComRegister {
|
|
|
159
159
|
console.log(data);
|
|
160
160
|
await session.send(
|
|
161
161
|
<>
|
|
162
|
-
<img width="10px" height="10px" src="https://koishi.chat/logo.png"/>
|
|
162
|
+
<img width="10px" height="10px" src="https://koishi.chat/logo.png" />
|
|
163
163
|
</>
|
|
164
164
|
)
|
|
165
165
|
}) */
|
|
@@ -376,6 +376,9 @@ class ComRegister {
|
|
|
376
376
|
let targetId;
|
|
377
377
|
// 判断是否输入了QQ群号
|
|
378
378
|
if (guildId.length > 0) { // 输入了QQ群号
|
|
379
|
+
// 判断是否需要加入的群全部推送
|
|
380
|
+
if (guildId[0] === 'ALL' || guildId[0] === 'all')
|
|
381
|
+
return ['ALL'];
|
|
379
382
|
// 定义方法
|
|
380
383
|
const checkIfGuildHasJoined = async (bot) => {
|
|
381
384
|
// 获取机器人加入的群组
|
|
@@ -688,6 +691,80 @@ class ComRegister {
|
|
|
688
691
|
await this.sendPrivateMsg(bot, 'Hello World');
|
|
689
692
|
await session.send('已发送消息,如未收到则说明您的机器人不支持发送私聊消息或您的信息填写有误');
|
|
690
693
|
});
|
|
694
|
+
biliCom
|
|
695
|
+
.subcommand('.reboot', '测试插件自动重启功能', { hidden: true })
|
|
696
|
+
.usage('测试插件自动重启功能')
|
|
697
|
+
.example('bili reboot 测试插件自动重启功能')
|
|
698
|
+
.action(async ({ session }) => {
|
|
699
|
+
// 发送提示消息
|
|
700
|
+
await session.send('测试biliAPI等服务自动重启功能');
|
|
701
|
+
// 获取对应Bot
|
|
702
|
+
let bot;
|
|
703
|
+
switch (session.event.platform) {
|
|
704
|
+
case 'qq':
|
|
705
|
+
bot = this.qqBot;
|
|
706
|
+
break;
|
|
707
|
+
case 'qqguild':
|
|
708
|
+
bot = this.qqguildBot;
|
|
709
|
+
break;
|
|
710
|
+
case 'onebot':
|
|
711
|
+
bot = this.oneBot;
|
|
712
|
+
break;
|
|
713
|
+
case 'red':
|
|
714
|
+
bot = this.redBot;
|
|
715
|
+
break;
|
|
716
|
+
case 'telegram':
|
|
717
|
+
bot = this.telegramBot;
|
|
718
|
+
break;
|
|
719
|
+
case 'satori':
|
|
720
|
+
bot = this.satoriBot;
|
|
721
|
+
break;
|
|
722
|
+
case 'chronocat':
|
|
723
|
+
bot = this.chronocatBot;
|
|
724
|
+
break;
|
|
725
|
+
default: {
|
|
726
|
+
return `暂不支持该平台`;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
// 发送提示消息,重启服务
|
|
730
|
+
await this.sendPrivateMsgAndRebootService(bot, ctx, '测试biliAPI等服务自动重启功能');
|
|
731
|
+
});
|
|
732
|
+
biliCom
|
|
733
|
+
.subcommand('.sendall', '测试给机器人加入的所有群发送消息')
|
|
734
|
+
.usage('测试给机器人加入的所有群发送消息')
|
|
735
|
+
.example('bili sendall 测试给机器人加入的所有群发送消息')
|
|
736
|
+
.action(async ({ session }) => {
|
|
737
|
+
// 获取对应Bot
|
|
738
|
+
let bot;
|
|
739
|
+
switch (session.event.platform) {
|
|
740
|
+
case 'qq':
|
|
741
|
+
bot = this.qqBot;
|
|
742
|
+
break;
|
|
743
|
+
case 'qqguild':
|
|
744
|
+
bot = this.qqguildBot;
|
|
745
|
+
break;
|
|
746
|
+
case 'onebot':
|
|
747
|
+
bot = this.oneBot;
|
|
748
|
+
break;
|
|
749
|
+
case 'red':
|
|
750
|
+
bot = this.redBot;
|
|
751
|
+
break;
|
|
752
|
+
case 'telegram':
|
|
753
|
+
bot = this.telegramBot;
|
|
754
|
+
break;
|
|
755
|
+
case 'satori':
|
|
756
|
+
bot = this.satoriBot;
|
|
757
|
+
break;
|
|
758
|
+
case 'chronocat':
|
|
759
|
+
bot = this.chronocatBot;
|
|
760
|
+
break;
|
|
761
|
+
default: {
|
|
762
|
+
return `暂不支持该平台`;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
await this.sendMsg(['ALL'], bot, 'Hello World');
|
|
766
|
+
await session.send('已向机器人加入的所有群发送了消息');
|
|
767
|
+
});
|
|
691
768
|
}
|
|
692
769
|
async sendPrivateMsg(bot, content) {
|
|
693
770
|
if (this.config.master.enable) {
|
|
@@ -798,13 +875,8 @@ class ComRegister {
|
|
|
798
875
|
break;
|
|
799
876
|
}
|
|
800
877
|
catch (e) {
|
|
801
|
-
this.logger.error('dynamicDetect
|
|
878
|
+
this.logger.error('dynamicDetect generateDynamicImg() 推送卡片发送失败,原因:' + e.toString());
|
|
802
879
|
if (i === attempts - 1) { // 如果已经尝试了三次,那么抛出错误
|
|
803
|
-
/* return this.sendMsg(
|
|
804
|
-
guildId,
|
|
805
|
-
bot,
|
|
806
|
-
'插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈'
|
|
807
|
-
) */
|
|
808
880
|
return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
|
|
809
881
|
}
|
|
810
882
|
}
|
|
@@ -824,9 +896,28 @@ class ComRegister {
|
|
|
824
896
|
};
|
|
825
897
|
}
|
|
826
898
|
async sendMsg(targets, bot, content) {
|
|
899
|
+
// 判断是否需要给全部加入的群发送
|
|
900
|
+
if (targets[0] === 'ALL') {
|
|
901
|
+
// 把All弹出
|
|
902
|
+
targets.pop();
|
|
903
|
+
// 获取所有guild
|
|
904
|
+
for (let guild in await bot.getGuildList())
|
|
905
|
+
targets.push(guild);
|
|
906
|
+
}
|
|
827
907
|
// 循环给每个群组发送
|
|
828
908
|
for (let guildId of targets) {
|
|
829
|
-
|
|
909
|
+
// 多次尝试生成图片
|
|
910
|
+
let attempts = 3;
|
|
911
|
+
for (let i = 0; i < attempts; i++) {
|
|
912
|
+
try {
|
|
913
|
+
await bot.sendMessage(guildId, content);
|
|
914
|
+
}
|
|
915
|
+
catch (e) {
|
|
916
|
+
if (i === attempts - 1) { // 已尝试三次
|
|
917
|
+
throw new Error(`发送群组ID:${guildId}消息失败!原因: ` + e.toString());
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
830
921
|
}
|
|
831
922
|
}
|
|
832
923
|
liveDetect(ctx, bot, roomId, guildId) {
|
|
@@ -871,11 +962,6 @@ class ComRegister {
|
|
|
871
962
|
catch (e) {
|
|
872
963
|
this.logger.error('liveDetect generateLiveImg() 推送卡片发送失败,原因:' + e.toString());
|
|
873
964
|
if (i === attempts - 1) { // 已尝试三次
|
|
874
|
-
/* return this.sendMsg(
|
|
875
|
-
guildId,
|
|
876
|
-
bot,
|
|
877
|
-
'插件可能出现某些未知错误,已自动重启插件,如果仍然发生该错误,请带着日志向作者反馈'
|
|
878
|
-
) */
|
|
879
965
|
return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
|
|
880
966
|
}
|
|
881
967
|
}
|
|
@@ -900,11 +986,6 @@ class ComRegister {
|
|
|
900
986
|
catch (e) {
|
|
901
987
|
this.logger.error('liveDetect getLiveRoomInfo 网络请求失败');
|
|
902
988
|
if (i === attempts - 1) { // 已尝试三次
|
|
903
|
-
/* return await this.sendMsg(
|
|
904
|
-
guildId,
|
|
905
|
-
bot,
|
|
906
|
-
'你的网络可能出现了某些问题,请检查后重启插件',
|
|
907
|
-
) */
|
|
908
989
|
return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
|
|
909
990
|
}
|
|
910
991
|
}
|
|
@@ -927,11 +1008,6 @@ class ComRegister {
|
|
|
927
1008
|
catch (e) {
|
|
928
1009
|
this.logger.error('liveDetect getMasterInfo() 本次网络请求失败');
|
|
929
1010
|
if (i === attempts - 1) { // 已尝试三次
|
|
930
|
-
/* return await this.sendMsg(
|
|
931
|
-
guildId,
|
|
932
|
-
bot,
|
|
933
|
-
'你的网络可能出现了某些问题,请检查后重启插件',
|
|
934
|
-
) */
|
|
935
1011
|
return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
|
|
936
1012
|
}
|
|
937
1013
|
}
|
|
@@ -988,11 +1064,6 @@ class ComRegister {
|
|
|
988
1064
|
catch (e) {
|
|
989
1065
|
this.logger.error('liveDetect open getMasterInfo() 网络请求错误');
|
|
990
1066
|
if (i === attempts - 1) { // 已尝试三次
|
|
991
|
-
/* return this.sendMsg(
|
|
992
|
-
guildId,
|
|
993
|
-
bot,
|
|
994
|
-
'你的网络可能出现了某些问题,请检查后重启插件',
|
|
995
|
-
) */
|
|
996
1067
|
return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
|
|
997
1068
|
}
|
|
998
1069
|
}
|
|
@@ -1200,11 +1271,6 @@ class ComRegister {
|
|
|
1200
1271
|
catch (e) {
|
|
1201
1272
|
this.logger.error('getSubFromDatabase() getUserInfo() 本次网络请求失败');
|
|
1202
1273
|
if (i === attempts - 1) { // 已尝试三次
|
|
1203
|
-
/* return await this.sendMsg(
|
|
1204
|
-
targetArr,
|
|
1205
|
-
bot,
|
|
1206
|
-
'你的网络可能出现了某些问题,请检查后重启插件'
|
|
1207
|
-
) */
|
|
1208
1274
|
return await this.sendPrivateMsgAndRebootService(bot, ctx, '你的网络可能出现了某些问题,请检查后重启插件');
|
|
1209
1275
|
}
|
|
1210
1276
|
}
|
|
@@ -1217,11 +1283,6 @@ class ComRegister {
|
|
|
1217
1283
|
await ctx.database.remove('bilibili', { id: sub.id });
|
|
1218
1284
|
// 给用户发送提示
|
|
1219
1285
|
await this.sendPrivateMsg(bot, `UID:${sub.uid} 数据库内容被篡改,已取消对该UP主的订阅`);
|
|
1220
|
-
/* await this.sendMsg(
|
|
1221
|
-
targetArr,
|
|
1222
|
-
bot,
|
|
1223
|
-
`UID:${sub.uid} 数据库内容被篡改,已取消对该UP主的订阅`
|
|
1224
|
-
) */
|
|
1225
1286
|
};
|
|
1226
1287
|
// 判断是否有其他问题
|
|
1227
1288
|
if (content.code !== 0) {
|
|
@@ -1229,11 +1290,6 @@ class ComRegister {
|
|
|
1229
1290
|
case -352:
|
|
1230
1291
|
case -403: {
|
|
1231
1292
|
await this.sendPrivateMsg(bot, '你的登录信息已过期,请重新登录Bilibili');
|
|
1232
|
-
/* this.sendMsg(
|
|
1233
|
-
targetArr,
|
|
1234
|
-
bot,
|
|
1235
|
-
'你的登录信息已过期,请重新登录Bilibili'
|
|
1236
|
-
) */
|
|
1237
1293
|
return;
|
|
1238
1294
|
}
|
|
1239
1295
|
case -400:
|
package/lib/generateImg.js
CHANGED
|
@@ -390,36 +390,37 @@ class GenerateImg extends koishi_1.Service {
|
|
|
390
390
|
<span class="reserve-time">${reserve.desc1.text}</span>
|
|
391
391
|
<span class="reserve-num">${reserve.desc2.text}</span>
|
|
392
392
|
</div>
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
393
|
+
${reserve.desc3 ?
|
|
394
|
+
`<div class="reserve-prize">
|
|
395
|
+
<svg class="bili-dyn-card-reserve__lottery__icon"
|
|
396
|
+
style="width: 16px; height: 16px;" xmlns="http://www.w3.org/2000/svg"
|
|
397
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" width="16"
|
|
398
|
+
height="16">
|
|
399
|
+
<path
|
|
400
|
+
d="M2.99998 7.785666666666666C3.2761266666666664 7.785666666666666 3.49998 8.0095 3.49998 8.285666666666666L3.49998 12.285666666666666C3.49998 12.719566666666667 3.8517599999999996 13.071333333333332 4.285693333333333 13.071333333333332L11.714266666666667 13.071333333333332C12.1482 13.071333333333332 12.5 12.719566666666667 12.5 12.285666666666666L12.5 8.285666666666666C12.5 8.0095 12.723833333333333 7.785666666666666 13 7.785666666666666C13.276133333333334 7.785666666666666 13.5 8.0095 13.5 8.285666666666666L13.5 12.285666666666666C13.5 13.271866666666668 12.7005 14.071333333333332 11.714266666666667 14.071333333333332L4.285693333333333 14.071333333333332C3.2994733333333333 14.071333333333332 2.49998 13.271866666666668 2.49998 12.285666666666666L2.49998 8.285666666666666C2.49998 8.0095 2.7238399999999996 7.785666666666666 2.99998 7.785666666666666z"
|
|
401
|
+
fill="currentColor"></path>
|
|
402
|
+
<path
|
|
403
|
+
d="M1.9285533333333333 5.857139999999999C1.9285533333333333 5.107613333333333 2.5361666666666665 4.5 3.285693333333333 4.5L12.714266666666667 4.5C13.463799999999999 4.5 14.071399999999999 5.107613333333333 14.071399999999999 5.857139999999999L14.071399999999999 7.134066666666667C14.071399999999999 7.793799999999999 13.590066666666667 8.373766666666667 12.905000000000001 8.4432C12.058933333333332 8.528966666666665 10.470166666666666 8.642866666666666 8 8.642866666666666C5.529819999999999 8.642866666666666 3.9410399999999997 8.528966666666665 3.09498 8.4432C2.4099066666666666 8.373766666666667 1.9285533333333333 7.793799999999999 1.9285533333333333 7.134066666666667L1.9285533333333333 5.857139999999999zM3.285693333333333 5.5C3.088453333333333 5.5 2.9285533333333333 5.6599 2.9285533333333333 5.857139999999999L2.9285533333333333 7.134066666666667C2.9285533333333333 7.3082 3.0432666666666663 7.432833333333333 3.1958066666666665 7.4483C4.00544 7.530366666666667 5.560420000000001 7.6428666666666665 8 7.6428666666666665C10.439566666666666 7.6428666666666665 11.994533333333333 7.530366666666667 12.804133333333333 7.4483C12.9567 7.432833333333333 13.071399999999999 7.3082 13.071399999999999 7.134066666666667L13.071399999999999 5.857139999999999C13.071399999999999 5.6599 12.911499999999998 5.5 12.714266666666667 5.5L3.285693333333333 5.5z"
|
|
404
|
+
fill="currentColor"></path>
|
|
405
|
+
<path
|
|
406
|
+
d="M4.357126666666666 3.5714733333333335C4.357126666666666 2.506353333333333 5.220573333333333 1.6429066666666667 6.285693333333333 1.6429066666666667C7.350833333333332 1.6429066666666667 8.214266666666667 2.506353333333333 8.214266666666667 3.5714733333333335L8.214266666666667 5.500046666666666L6.285693333333333 5.500046666666666C5.220573333333333 5.500046666666666 4.357126666666666 4.636593333333333 4.357126666666666 3.5714733333333335zM6.285693333333333 2.6429066666666667C5.77286 2.6429066666666667 5.357126666666667 3.0586399999999996 5.357126666666667 3.5714733333333335C5.357126666666667 4.084313333333333 5.77286 4.500046666666666 6.285693333333333 4.500046666666666L7.214266666666667 4.500046666666666L7.214266666666667 3.5714733333333335C7.214266666666667 3.0586399999999996 6.798533333333333 2.6429066666666667 6.285693333333333 2.6429066666666667z"
|
|
407
|
+
fill="currentColor"></path>
|
|
408
|
+
<path
|
|
409
|
+
d="M7.785666666666666 3.5714733333333335C7.785666666666666 2.506353333333333 8.649133333333332 1.6429066666666667 9.714266666666667 1.6429066666666667C10.779399999999999 1.6429066666666667 11.642866666666666 2.506353333333333 11.642866666666666 3.5714733333333335C11.642866666666666 4.636593333333333 10.779399999999999 5.500046666666666 9.714266666666667 5.500046666666666L7.785666666666666 5.500046666666666L7.785666666666666 3.5714733333333335zM9.714266666666667 2.6429066666666667C9.201433333333332 2.6429066666666667 8.785666666666666 3.0586399999999996 8.785666666666666 3.5714733333333335L8.785666666666666 4.500046666666666L9.714266666666667 4.500046666666666C10.2271 4.500046666666666 10.642866666666666 4.084313333333333 10.642866666666666 3.5714733333333335C10.642866666666666 3.0586399999999996 10.2271 2.6429066666666667 9.714266666666667 2.6429066666666667z"
|
|
410
|
+
fill="currentColor"></path>
|
|
411
|
+
<path
|
|
412
|
+
d="M8 3.7856466666666666C8.276133333333332 3.7856466666666666 8.5 4.009499999999999 8.5 4.285646666666667L8.5 13.142800000000001C8.5 13.418933333333332 8.276133333333332 13.642800000000001 8 13.642800000000001C7.723833333333333 13.642800000000001 7.5 13.418933333333332 7.5 13.142800000000001L7.5 4.285646666666667C7.5 4.009499999999999 7.723833333333333 3.7856466666666666 8 3.7856466666666666z"
|
|
413
|
+
fill="currentColor"></path>
|
|
414
|
+
</svg>
|
|
415
|
+
<span>${reserve.desc3.text}</span>
|
|
416
|
+
<svg style="width: 12px; height: 12px;" xmlns="http://www.w3.org/2000/svg"
|
|
417
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 12 12" width="12"
|
|
418
|
+
height="12">
|
|
419
|
+
<path
|
|
420
|
+
d="M4.359835 1.609835C4.21339 1.756285 4.21339 1.99372 4.359835 2.140165L8.0429 5.823225C8.140525 5.920875 8.140525 6.079125 8.0429 6.176775L4.359835 9.859825C4.21339 10.006275 4.21339 10.243725 4.359835 10.390175C4.506285 10.5366 4.743725 10.5366 4.89017 10.390175L8.573225 6.7071C8.96375 6.316575 8.96375 5.683425 8.573225 5.2929L4.89017 1.609835C4.743725 1.46339 4.506285 1.46339 4.359835 1.609835z"
|
|
421
|
+
fill="currentColor"></path>
|
|
422
|
+
</svg>
|
|
423
|
+
</div>` : ''}
|
|
423
424
|
</div>
|
|
424
425
|
</div>
|
|
425
426
|
<div class="reserve-button">
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
- 使用指令 `bili sub <uid> [Q群号]` 订阅需要订阅的UP主
|
|
37
37
|
- 参数说明:
|
|
38
38
|
- `uid` 为必填参数,为 `up主` 的 `uid`
|
|
39
|
-
- `Q群号`
|
|
39
|
+
- `Q群号` 为可选参数,可以添加多个,如果Q群号为 `ALL` 或 `all` 则会向机器人加入的所有群聊推送
|
|
40
40
|
- 选项说明:`bili sub <uid>` 有两个选项:-l 和 -d
|
|
41
41
|
- `-l` 为订阅UP主直播间,包括直播开播通知,定时推送直播内容,下播通知
|
|
42
42
|
- `-d` 为订阅UP主动态推送,目前实现推送的动态类型有:普通图文动态,转发动态,直播预约动态
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
- `bili sub 1194210119 -d` 订阅UID为1194210119的UP主动态推送
|
|
47
47
|
- `bili sub 1194210119 -ld` 订阅UID为1194210119的UP主动态推送和直播间
|
|
48
48
|
- `bili sub 1194210119 1234567 2345678` 订阅UID为1194210119的UP主,向Q群号为1234567和2345678两个群进行推送
|
|
49
|
+
- `bili sub 1194210119 all` 订阅UID为1194210119的UP主,向机器人加入的所有群聊进行推送
|
|
49
50
|
- Tips:
|
|
50
51
|
- 除非使用指令 `bili sub 1194210119 -ld` ,没有加选项或只加了一个选项的指令都会再次询问是否需要订阅另一项。例如:使用指令 `bili sub 1194210119 -d` 机器人会询问是否需要订阅直播间
|
|
51
52
|
- `[Q群号]` 这个可选参数仅支持Q群
|
|
@@ -122,6 +123,8 @@
|
|
|
122
123
|
- ver 1.2.3-alpha.0 新增主人账号功能,开启后,会将插件的错误消息向主人账号发送(实验性)。修复订阅消息推送失败刷屏的bug
|
|
123
124
|
- ver 1.2.3-beta.0 优化错误推送逻辑,现在只有设置主人账号后才会推送错误消息
|
|
124
125
|
- ver 1.2.3-beta.1 新增指令 `bili private` 方便测试主人账号功能
|
|
126
|
+
- ver 1.2.3-beta.2 功能测试版本,请跳过该版本
|
|
127
|
+
- ver 1.2.3-rc.0 现已支持向机器人加入的所有群发送推送消息(仅支持Q群,实验性),修复预约动态无法正常推送的bug
|
|
125
128
|
|
|
126
129
|
## 交流群
|
|
127
130
|
|