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

Method getAllEnabledUsers

autochangename/autochangename.ts:233–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231
232 static async getAllEnabledUsers(): Promise<number[]> {
233 await this.init();
234 const users = this.db?.data?.users ?? {};
235 return Object.entries(users)
236 .filter(([_, v]) => v.is_enabled)
237 .map(([k]) => parseInt(k, 10));
238 }
239
240 static cleanup(): void {
241 // 引用重置:清空 db 和 initPromise,便于 reload 后重新初始化
242 this.db = null;

Callers 4

startAutoUpdateMethod · 0.80
setupMethod · 0.80
handleStatusMethod · 0.80
initMethod · 0.80

Calls 1

initMethod · 0.95

Tested by

no test coverage detected