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

Method init

outdated/gemini/gemini.ts:58–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 private static initialized = false;
57
58 private static init(): void {
59 if (this.initialized) return;
60 try {
61 this.db = new Database(CONFIG_DB_PATH);
62 this.db.exec(`
63 CREATE TABLE IF NOT EXISTS config (
64 key TEXT PRIMARY KEY,
65 value TEXT NOT NULL,
66 updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
67 )
68 `);
69 this.initialized = true;
70 } catch (error) {
71 console.error("初始化配置数据库失败:", error);
72 }
73 }
74
75 static get(key: string, defaultValue?: string): string {
76 this.init();

Callers 4

getMethod · 0.95
setMethod · 0.95
getAllMethod · 0.95
deleteMethod · 0.95

Calls 2

execMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected