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

Method set

komari/komari.ts:67–80  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

65 }
66
67 static set(key: string, value: string): void {
68 this.init();
69 if (!this.db) return;
70
71 try {
72 const stmt = this.db.prepare(`
73 INSERT OR REPLACE INTO config (key, value, updated_at)
74 VALUES (?, ?, CURRENT_TIMESTAMP)
75 `);
76 stmt.run(key, value);
77 } catch (error) {
78 console.error("保存Komari配置失败:", error);
79 }
80 }
81
82 // 获取所有配置
83 static getAll(): { [key: string]: string } {

Callers 2

waitForBotReplyMethod · 0.45
handleKomariRequestFunction · 0.45

Calls 3

initMethod · 0.95
runMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected