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

Function set

pmcaptcha/pmcaptcha.ts:256–267  ·  view source on GitHub ↗
(key: string, value: any)

Source from the content-addressed store, hash-verified

254 if (!dataDb) return;
255 dataDb.data[key] = value;
256 dataDb.write().catch(e => log(LogLevel.ERROR, `data write failed: ${key}`, e));
257 } else {
258 if (!configDb) return;
259 configDb.data[key] = value;
260 configDb.write().catch(e => log(LogLevel.ERROR, `config write failed: ${key}`, e));
261 }
262}
263
264const cfg = {
265 pluginOn: () => get(K.ENABLED, true),
266 captchaOn: () => get(K.CAP_ENABLED, false),
267 mode: () => {
268 const v = get<string>(K.CAP_MODE, CaptchaMode.MATH);
269 return (Object.values(CaptchaMode) as string[]).includes(v)
270 ? v as CaptchaMode

Callers 2

pmcaptcha.tsFile · 0.85
pmcaptchaFunction · 0.85

Calls 2

logFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected