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

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