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

Function getConfigValue

banana/banana.ts:115–127  ·  view source on GitHub ↗
(
  key: TKey,
)

Source from the content-addressed store, hash-verified

113 }
114 return value ?? CONFIG_DEFAULTS[key];
115}
116
117async function setConfigValue<TKey extends keyof BananaConfig>(
118 key: TKey,
119 value: BananaConfig[TKey],
120): Promise<void> {
121 const db = await getDb();
122 db.data![key] = value;
123 await db.write();
124}
125
126function parseSizeInput(raw: string): number | null {
127 const normalized = raw.trim().toLowerCase();
128 if (!normalized) return null;
129
130 const match = normalized.match(/^(\d+(?:\.\d+)?)(b|kb|mb|gb)?$/);

Callers 3

resolveMaxImageBytesFunction · 0.85
handleConfigFunction · 0.85
handleImageEditFunction · 0.85

Calls 1

getDbFunction · 0.70

Tested by

no test coverage detected