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

Function parseImageCount

cosplay/cosplay.ts:289–297  ·  view source on GitHub ↗
(text: string | undefined)

Source from the content-addressed store, hash-verified

287}
288
289function parseImageCount(text: string | undefined): number {
290 if (!text) return CONFIG.DEFAULT_COUNT;
291
292 const args = text.split(" ").slice(1);
293 if (!args[0]) return CONFIG.DEFAULT_COUNT;
294
295 const n = parseInt(args[0], 10);
296 return !isNaN(n) && n > 0 ? Math.min(n, CONFIG.MAX_IMAGES) : CONFIG.DEFAULT_COUNT;
297}
298
299async function sendSingleImage(
300 client: any,

Callers 1

CosplayPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected