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 +7 -3
- package/lib/index.mjs +7 -3
- package/package.json +1 -1
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.
|
|
889
|
-
|
|
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.
|
|
871
|
-
|
|
872
|
-
}, retry);
|
|
875
|
+
await this.ctx.sleep(retry);
|
|
876
|
+
await this.pushMessage(targets, content, retry * 2);
|
|
873
877
|
return;
|
|
874
878
|
}
|
|
875
879
|
try {
|