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

Method set

convert/convert.ts:65–76  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

63 if (!this.db) {
64 console.error("[convert] DB not initialized, cannot set config.");
65 return;
66 }
67 try {
68 this.db.prepare(`INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)`).run(key, value);
69 } catch (error) {
70 console.error("[convert] Failed to save config:", error);
71 }
72 }
73
74 static cleanup(): void {
75 if (this.db) {
76 try {
77 this.db.close();
78 } catch {}
79 }

Callers 4

setCacheFunction · 0.45
handleApiKeyCommandMethod · 0.45
addWordFunction · 0.45
cleanDeletedPMMethod · 0.45

Calls 3

initMethod · 0.95
errorMethod · 0.80
runMethod · 0.80

Tested by

no test coverage detected