(user: any, includeAll: boolean, consecutiveErrors: number)
| 518 | } catch (error) { |
| 519 | // 忽略删除错误 |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | private getDynamicDelay(user: any, includeAll: boolean, consecutiveErrors: number): number { |
| 524 | let delay = 200; |
| 525 | |
| 526 | if (user.bot) delay = 1500; |
| 527 | else if (user.scam || user.fake) delay = 800; |
| 528 | |
| 529 | if (includeAll) delay = Math.max(delay, 1000); |
| 530 | if (consecutiveErrors > 0) delay = delay * (1 + consecutiveErrors * 0.5); |
| 531 | |
| 532 | return Math.min(delay, 5000); |
| 533 | } |