@apidog/multibot-sdk-ts
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -150,6 +150,17 @@ "use strict"; | ||
this.isPollingActive = true; | ||
let errorCountInRow = 0; | ||
(() => __awaiter(this, void 0, void 0, function* () { | ||
while (this.isPollingActive) { | ||
// eslint-disable-next-line no-await-in-loop | ||
yield this.poll(); | ||
try { | ||
// eslint-disable-next-line no-await-in-loop | ||
yield this.poll(); | ||
errorCountInRow = 0; | ||
} | ||
catch (e) { | ||
++errorCountInRow; | ||
if (errorCountInRow > 3) { | ||
console.error('3 requests in a row failed. The bot has stopped.'); | ||
process.exit(5); | ||
} | ||
} | ||
} | ||
@@ -156,0 +167,0 @@ }))(); |
{ | ||
"name": "@apidog/multibot-sdk-ts", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Telegram and VK bot SDK for TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194670
2893