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

Function getCustomEmojiDocuments

quote/quote.ts:1104–1113  ·  view source on GitHub ↗
(client: any, ids: string[])

Source from the content-addressed store, hash-verified

1102 out.split(/\r?\n/).forEach((line) => {
1103 const idx = line.indexOf("=");
1104 if (idx > 0) data.set(line.slice(0, idx), line.slice(idx + 1));
1105 });
1106 const fps = Math.max(1, Math.min(60, parseFps(data.get("avg_frame_rate"), parseFps(data.get("r_frame_rate"), 12))));
1107 const durationRaw = Number(data.get("duration") || data.get("TAG:DURATION") || data.get("format.duration"));
1108 const duration = Number.isFinite(durationRaw) && durationRaw > 0 ? durationRaw : 2;
1109 return { fps, duration };
1110 } catch (err: any) {
1111 console.warn("quote animated probe failed", err?.message || err);
1112 return { fps: 12, duration: 2 };
1113 } finally {
1114 try { if (fs.existsSync(input)) fs.unlinkSync(input); } catch (err) {
1115 console.debug("[quote] waitForStableFile loop error:", err?.message || err);
1116 }

Callers 1

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected