koishi-plugin-bilibili-notify 1.2.3-beta.2 → 1.2.3-rc.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/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: cookieData } = await this.getCookieInfo(refreshToken);
287
- data = cookieData;
284
+ const { data } = await this.getCookieInfo(refreshToken);
285
+ // 不需要刷新,直接返回
286
+ if (!data.refresh)
287
+ return;
288
288
  }
289
289
  catch (e) {
290
- // 发送三次仍网络错误则给管理员发送错误信息
291
- if (times < 1)
292
- return;
293
- // 等待3秒再次尝试
294
- this.ctx.setTimeout(() => {
295
- this.checkIfTokenNeedRefresh(refreshToken, csrf, times - 1);
296
- }, 3000);
297
- return;
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",
@@ -29,7 +29,7 @@ declare class ComRegister {
29
29
  sendPrivateMsg(bot: Bot<Context>, content: string): Promise<void>;
30
30
  sendPrivateMsgAndRebootService(bot: Bot<Context>, ctx: Context, content: string): Promise<void>;
31
31
  dynamicDetect(ctx: Context, bot: Bot<Context>, uid: string, guildId: Array<string>): () => Promise<void>;
32
- sendMsg(targets: Array<string>, bot: Bot<Context>, content: any): Promise<void>;
32
+ sendMsg(targets: Array<string>, bot: Bot<Context>, content: any): Promise<string[]>;
33
33
  liveDetect(ctx: Context, bot: Bot<Context>, roomId: string, guildId: Array<string>): () => Promise<void>;
34
34
  subShow(): string;
35
35
  checkIfNeedSub(comNeed: boolean, subType: string, session: Session, data?: any): Promise<boolean>;
@@ -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
  // 获取机器人加入的群组
@@ -726,6 +729,42 @@ class ComRegister {
726
729
  // 发送提示消息,重启服务
727
730
  await this.sendPrivateMsgAndRebootService(bot, ctx, '测试biliAPI等服务自动重启功能');
728
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
+ });
729
768
  }
730
769
  async sendPrivateMsg(bot, content) {
731
770
  if (this.config.master.enable) {
@@ -836,13 +875,8 @@ class ComRegister {
836
875
  break;
837
876
  }
838
877
  catch (e) {
839
- this.logger.error('dynamicDetect generateLiveImg() 推送卡片发送失败,原因:' + e.toString());
878
+ this.logger.error('dynamicDetect generateDynamicImg() 推送卡片发送失败,原因:' + e.toString());
840
879
  if (i === attempts - 1) { // 如果已经尝试了三次,那么抛出错误
841
- /* return this.sendMsg(
842
- guildId,
843
- bot,
844
- '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈'
845
- ) */
846
880
  return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
847
881
  }
848
882
  }
@@ -862,9 +896,33 @@ class ComRegister {
862
896
  };
863
897
  }
864
898
  async sendMsg(targets, bot, content) {
899
+ // 定义需要发送的数组
900
+ let sendArr = [];
901
+ // 判断是否需要推送所有机器人加入的群
902
+ if (targets[0] === 'ALL') {
903
+ // 获取所有guild
904
+ for (let guild in (await bot.getGuildList())) {
905
+ this.logger.info(`已加入${guild}`);
906
+ sendArr.push(guild);
907
+ }
908
+ }
909
+ else {
910
+ sendArr = targets;
911
+ }
865
912
  // 循环给每个群组发送
866
- for (let guildId of targets) {
867
- bot.sendMessage(guildId, content);
913
+ for (let guildId of sendArr) {
914
+ // 多次尝试生成图片
915
+ let attempts = 3;
916
+ for (let i = 0; i < attempts; i++) {
917
+ try {
918
+ return await bot.sendMessage(guildId, content);
919
+ }
920
+ catch (e) {
921
+ if (i === attempts - 1) { // 已尝试三次
922
+ throw new Error(`发送群组ID:${guildId}消息失败!原因: ` + e.toString());
923
+ }
924
+ }
925
+ }
868
926
  }
869
927
  }
870
928
  liveDetect(ctx, bot, roomId, guildId) {
@@ -909,11 +967,6 @@ class ComRegister {
909
967
  catch (e) {
910
968
  this.logger.error('liveDetect generateLiveImg() 推送卡片发送失败,原因:' + e.toString());
911
969
  if (i === attempts - 1) { // 已尝试三次
912
- /* return this.sendMsg(
913
- guildId,
914
- bot,
915
- '插件可能出现某些未知错误,已自动重启插件,如果仍然发生该错误,请带着日志向作者反馈'
916
- ) */
917
970
  return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
918
971
  }
919
972
  }
@@ -938,11 +991,6 @@ class ComRegister {
938
991
  catch (e) {
939
992
  this.logger.error('liveDetect getLiveRoomInfo 网络请求失败');
940
993
  if (i === attempts - 1) { // 已尝试三次
941
- /* return await this.sendMsg(
942
- guildId,
943
- bot,
944
- '你的网络可能出现了某些问题,请检查后重启插件',
945
- ) */
946
994
  return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
947
995
  }
948
996
  }
@@ -965,11 +1013,6 @@ class ComRegister {
965
1013
  catch (e) {
966
1014
  this.logger.error('liveDetect getMasterInfo() 本次网络请求失败');
967
1015
  if (i === attempts - 1) { // 已尝试三次
968
- /* return await this.sendMsg(
969
- guildId,
970
- bot,
971
- '你的网络可能出现了某些问题,请检查后重启插件',
972
- ) */
973
1016
  return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
974
1017
  }
975
1018
  }
@@ -1026,11 +1069,6 @@ class ComRegister {
1026
1069
  catch (e) {
1027
1070
  this.logger.error('liveDetect open getMasterInfo() 网络请求错误');
1028
1071
  if (i === attempts - 1) { // 已尝试三次
1029
- /* return this.sendMsg(
1030
- guildId,
1031
- bot,
1032
- '你的网络可能出现了某些问题,请检查后重启插件',
1033
- ) */
1034
1072
  return await this.sendPrivateMsgAndRebootService(bot, ctx, '插件可能出现某些未知错误,请尝试重启插件,如果仍然发生该错误,请带着日志向作者反馈');
1035
1073
  }
1036
1074
  }
@@ -1238,11 +1276,6 @@ class ComRegister {
1238
1276
  catch (e) {
1239
1277
  this.logger.error('getSubFromDatabase() getUserInfo() 本次网络请求失败');
1240
1278
  if (i === attempts - 1) { // 已尝试三次
1241
- /* return await this.sendMsg(
1242
- targetArr,
1243
- bot,
1244
- '你的网络可能出现了某些问题,请检查后重启插件'
1245
- ) */
1246
1279
  return await this.sendPrivateMsgAndRebootService(bot, ctx, '你的网络可能出现了某些问题,请检查后重启插件');
1247
1280
  }
1248
1281
  }
@@ -1255,11 +1288,6 @@ class ComRegister {
1255
1288
  await ctx.database.remove('bilibili', { id: sub.id });
1256
1289
  // 给用户发送提示
1257
1290
  await this.sendPrivateMsg(bot, `UID:${sub.uid} 数据库内容被篡改,已取消对该UP主的订阅`);
1258
- /* await this.sendMsg(
1259
- targetArr,
1260
- bot,
1261
- `UID:${sub.uid} 数据库内容被篡改,已取消对该UP主的订阅`
1262
- ) */
1263
1291
  };
1264
1292
  // 判断是否有其他问题
1265
1293
  if (content.code !== 0) {
@@ -1267,11 +1295,6 @@ class ComRegister {
1267
1295
  case -352:
1268
1296
  case -403: {
1269
1297
  await this.sendPrivateMsg(bot, '你的登录信息已过期,请重新登录Bilibili');
1270
- /* this.sendMsg(
1271
- targetArr,
1272
- bot,
1273
- '你的登录信息已过期,请重新登录Bilibili'
1274
- ) */
1275
1298
  return;
1276
1299
  }
1277
1300
  case -400:
@@ -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
- <div class="reserve-prize">
394
- <svg class="bili-dyn-card-reserve__lottery__icon"
395
- style="width: 16px; height: 16px;" xmlns="http://www.w3.org/2000/svg"
396
- xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" width="16"
397
- height="16">
398
- <path
399
- 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"
400
- fill="currentColor"></path>
401
- <path
402
- 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"
403
- fill="currentColor"></path>
404
- <path
405
- 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"
406
- fill="currentColor"></path>
407
- <path
408
- 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"
409
- fill="currentColor"></path>
410
- <path
411
- 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"
412
- fill="currentColor"></path>
413
- </svg>
414
- <span>${reserve.desc3.text}</span>
415
- <svg style="width: 12px; height: 12px;" xmlns="http://www.w3.org/2000/svg"
416
- xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 12 12" width="12"
417
- height="12">
418
- <path
419
- 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"
420
- fill="currentColor"></path>
421
- </svg>
422
- </div>
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "1.2.3-beta.2",
4
+ "version": "1.2.3-rc.1",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
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群
@@ -123,6 +124,8 @@
123
124
  - ver 1.2.3-beta.0 优化错误推送逻辑,现在只有设置主人账号后才会推送错误消息
124
125
  - ver 1.2.3-beta.1 新增指令 `bili private` 方便测试主人账号功能
125
126
  - ver 1.2.3-beta.2 功能测试版本,请跳过该版本
127
+ - ver 1.2.3-rc.0 现已支持向机器人加入的所有群发送推送消息(仅支持Q群,实验性),修复预约动态无法正常推送的bug
128
+ - ver 1.2.3-rc.1 修复 `1.2.3-rc.0` 出现的重复推送bug
126
129
 
127
130
  ## 交流群
128
131