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

Function getQuoteGen

quote/quote.ts:172–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170 await downloadFileIfMissingOrChanged(`${QUOTE_ASSETS_BASE_URL}/${rel}`, filePath);
171 }
172 }
173
174 for (const font of QUOTE_FONT_FILES) {
175 const filePath = path.join(QUOTE_ASSETS_DIR, font.name);
176 if (!fs.existsSync(filePath)) {
177 console.warn("quote loader downloading CJK font", { name: font.name });
178 await downloadFileIfMissingOrChanged(font.url, filePath);
179 }
180 }
181}
182
183async function getQuoteGen(): Promise<any> {
184 if (!quoteGenPromise) {
185 quoteGenPromise = (async () => {
186 await ensureQuoteAssets();
187 requireOrInstall("canvas");
188 requireOrInstall("sharp");
189 // vendor/ pulls these in at module load (quote-generate/index.js requires
190 // telegraf; avatar.js requires lru-cache + runes; media.js requires jimp +

Callers 2

handleQuoteMethod · 0.85

Calls 2

ensureQuoteAssetsFunction · 0.85
requireOrInstallFunction · 0.85

Tested by

no test coverage detected