MCPcopy Index your code
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getDynamicDelay

Method getDynamicDelay

clean/clean.ts:520–530  ·  view source on GitHub ↗
(user: any, includeAll: boolean, consecutiveErrors: number)

Source from the content-addressed store, hash-verified

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 }

Callers 1

cleanBlockedPMMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected