MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / parseTimeString

Function parseTimeString

aban/aban.ts:84–96  ·  view source on GitHub ↗
(timeStr?: string)

Source from the content-addressed store, hash-verified

82
83 const time = timeStr.toLowerCase();
84 const num = parseInt(time) || 0;
85
86 if (time.includes('d')) return num * 86400;
87 if (time.includes('h')) return num * 3600;
88 if (time.includes('m')) return num * 60;
89 if (time.includes('s')) return num;
90
91 return 0; // 默认永久
92}
93
94// ==================== 缓存管理器 ====================
95type CacheData = {
96 cache: Record<string, any>;
97};
98
99class CacheManager {

Callers 1

handleBasicCommandMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected