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

Function runWithConcurrency

quote/quote.ts:707–718  ·  view source on GitHub ↗
(items: T[], limit: number, worker: (item: T, index: number) => Promise<R>)

Source from the content-addressed store, hash-verified

705 const kind = getMediaKind(msg);
706 return kind === "photo" || kind === "sticker" || kind === "animation" || kind === "document";
707}
708
709function messageText(msg: Api.Message): string {
710 const text = (msg as any).message || "";
711 if (typeof text === "string" && text.trim()) return text;
712 const kind = getMediaKind(msg);
713 if (kind === "photo" || kind === "sticker" || kind === "animation" || kind === "document") return "";
714 return mediaFallbackText(msg);
715}
716
717function convertEntities(msg: Api.Message): any[] {
718 // Telegram puts formatting entities on the message body. For media messages
719 // the caption IS the body, so the entities already live in msg.entities.
720 // Some layers use a separate caption_entities field — merge both.
721 const msgEntities = ((msg as any).entities || []) as any[];

Callers 3

handleQuoteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected