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

Method get

sticker/sticker.ts:49–56  ·  view source on GitHub ↗
(key: string, defaultValue?: string)

Source from the content-addressed store, hash-verified

47 this.initialized = true;
48 } catch (error) {
49 console.error("[sticker] 初始化配置失败:", error);
50 }
51 }
52
53 static async get(key: string, defaultValue?: string): Promise<string> {
54 await this.init();
55 if (!this.db) return defaultValue || DEFAULT_CONFIG[key] || "";
56
57 // 直接从顶级键读取
58 const value = this.db.data[key];
59 return value ?? defaultValue ?? DEFAULT_CONFIG[key] ?? "";

Callers 2

handleStickerMethod · 0.45
handleConfigurationMethod · 0.45

Calls 1

initMethod · 0.95

Tested by

no test coverage detected