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

Method get

convert/convert.ts:50–63  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

48 if (!this.db) {
49 console.error("[convert] DB not initialized, cannot get config.");
50 return "";
51 }
52 try {
53 const row = this.db.prepare("SELECT value FROM config WHERE key = ?").get(key) as { value: string } | undefined;
54 return row ? row.value : "";
55 } catch (error) {
56 console.error("[convert] Failed to read config:", error);
57 return "";
58 }
59 }
60
61 static set(key: string, value: string): void {
62 this.init();
63 if (!this.db) {
64 console.error("[convert] DB not initialized, cannot set config.");
65 return;
66 }

Callers 7

fetchResponseStatusFunction · 0.45
searchAndDownloadCoverFunction · 0.45
handleVideoConversionMethod · 0.45
handleApiKeyCommandMethod · 0.45
fetchImageUrlsMethod · 0.45
getRandomPhotoSetMethod · 0.45
downloadImageMethod · 0.45

Calls 2

initMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected