koishi-plugin-bilibili-notify 1.0.0-beta.1 → 1.0.0-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.
@@ -18,7 +18,7 @@ declare class ComRegister {
18
18
  qqguildBot: Bot<Context>;
19
19
  constructor(ctx: Context, config: ComRegister.Config);
20
20
  dynamicDetect(ctx: Context, bot: Bot<Context>, guildId: string, uid: string): () => Promise<void>;
21
- liveDetect(ctx: Context, bot: Bot<Context>, guildId: string, roomId: string): () => Promise<false | void>;
21
+ liveDetect(ctx: Context, bot: Bot<Context>, guildId: string, roomId: string): () => Promise<void>;
22
22
  checkIfNeedSub(comNeed: boolean, subType: string, session: Session, data?: any): Promise<boolean>;
23
23
  getSubFromDatabase(ctx: Context): Promise<void>;
24
24
  unsubSingle(ctx: Context, id: string, type: number): string;
@@ -573,9 +573,12 @@ class ComRegister {
573
573
  let flag = true;
574
574
  return async () => {
575
575
  try {
576
+ // console.log('start before' + ' ' + flag);
576
577
  // 如果flag为false则说明前面的代码还未执行完,则直接返回
577
578
  if (!flag)
578
- return flag = false;
579
+ return;
580
+ flag && (flag = false);
581
+ // console.log('start after' + ' ' + flag);
579
582
  // 发送请求检测直播状态
580
583
  let content;
581
584
  try {
@@ -675,8 +678,10 @@ class ComRegister {
675
678
  }
676
679
  }
677
680
  finally {
681
+ // console.log('end before' + ' ' + flag);
678
682
  // 执行完方法体不论如何都把flag设置为true
679
683
  flag = true;
684
+ // console.log('end after' + ' ' + flag);
680
685
  }
681
686
  };
682
687
  }
@@ -908,7 +913,7 @@ class ComRegister {
908
913
  ComRegister.Config = koishi_1.Schema.object({
909
914
  pushTime: koishi_1.Schema.number().required(),
910
915
  liveLoopTime: koishi_1.Schema.number().default(10),
911
- dynamicLoopTime: koishi_1.Schema.number().default(30)
916
+ dynamicLoopTime: koishi_1.Schema.number().default(60)
912
917
  });
913
918
  })(ComRegister || (ComRegister = {}));
914
919
  exports.default = ComRegister;
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.0.0-beta.1",
4
+ "version": "1.0.0-rc.0",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],