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

Function scan

quote/quote.ts:938–943  ·  view source on GitHub ↗
(message: any)

Source from the content-addressed store, hash-verified

936async function downloadMessageMedia(msg: Api.Message, enabled: boolean): Promise<Buffer | undefined> {
937 if (!enabled || !(msg as any).media) return undefined;
938 const client = (msg as any).client ?? await getGlobalClient().catch(() => undefined);
939 if (!client) return undefined;
940 return downloadMediaToBuffer(client, msg);
941}
942
943async function mediaBufferToCanvas(buffer: Buffer | undefined, kind: string | undefined): Promise<any | undefined> {
944 if (!buffer || buffer.length === 0) return undefined;
945 try {
946 let imageBuffer = buffer;

Callers

nothing calls this directly

Calls 1

isAnimatedRasterBufferFunction · 0.85

Tested by

no test coverage detected