koishi-plugin-bilibili-notify 3.3.8-alpha.0 → 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 CHANGED
@@ -884,10 +884,14 @@ var ComRegister$1 = class {
884
884
  return;
885
885
  }
886
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
+ }
887
892
  this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,${retry / 1e3}秒后重试`);
888
- this.ctx.setTimeout(async () => {
889
- await this.pushMessage(targets, content, retry * 2);
890
- }, retry);
893
+ await this.ctx.sleep(retry);
894
+ await this.pushMessage(targets, content, retry * 2);
891
895
  return;
892
896
  }
893
897
  try {
package/lib/index.mjs CHANGED
@@ -866,10 +866,14 @@ var ComRegister$1 = class {
866
866
  return;
867
867
  }
868
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
+ }
869
874
  this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,${retry / 1e3}秒后重试`);
870
- this.ctx.setTimeout(async () => {
871
- await this.pushMessage(targets, content, retry * 2);
872
- }, retry);
875
+ await this.ctx.sleep(retry);
876
+ await this.pushMessage(targets, content, retry * 2);
873
877
  return;
874
878
  }
875
879
  try {
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": "3.3.8-alpha.0",
4
+ "version": "3.3.8-alpha.1",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [