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

Function initDatabase

da/da.ts:60–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58 db = new Low(adapter, { tasks: [] });
59 await db.read();
60};
61
62// 获取任务
63const getTask = async (chatId: string): Promise<DeleteTask | undefined> => {
64 if (!db) await initDatabase();
65 await db.read();
66 return db.data.tasks.find(t => t.chatId === chatId);
67};

Callers 4

getTaskFunction · 0.70
saveTaskFunction · 0.70
removeTaskFunction · 0.70
da.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected