(processed: number, total: number, elapsedMs: number)
| 556 | } |
| 557 | } |
| 558 | |
| 559 | private getDynamicDelay(user: any, includeAll: boolean, consecutiveErrors: number): number { |
| 560 | let delay = 200; |
| 561 | |
| 562 | if (user.bot) delay = 1500; |
| 563 | else if (user.scam || user.fake) delay = 800; |
| 564 | |
| 565 | if (includeAll) delay = Math.max(delay, 1000); |
| 566 | if (consecutiveErrors > 0) delay = delay * (1 + consecutiveErrors * 0.5); |
| 567 | |
| 568 | return Math.min(delay, 5000); |
| 569 | } |
| 570 | |
| 571 | private async updateBlockedProgress(msg: Api.Message, processed: number, total: number, |
no outgoing calls
no test coverage detected