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

Function applyCustomEmojiFrame

quote/quote.ts:856–873  ·  view source on GitHub ↗
(messages: any[], id: string, frame: Buffer)

Source from the content-addressed store, hash-verified

854 }),
855 dcId,
856 ),
857 QUOTE_RPC_TIMEOUT_MS,
858 "rawDownloadFile",
859 ) as { bytes?: unknown };
860 const buffer = result?.bytes;
861 return Buffer.isBuffer(buffer) && buffer.length > 0 ? buffer : undefined;
862 } catch (err: any) {
863 console.warn("quote rawDownloadFile failed", err?.message || err);
864 return undefined;
865 }
866}
867
868/**
869 * Download a Document (e.g. custom emoji) via raw upload.GetFile,
870 * bypassing the MediaScheduler's 75s retry loop.
871 */
872async function rawDownloadDocument(client: any, doc: any): Promise<Buffer | undefined> {
873 if (!client || !doc) return undefined;
874 const location = new Api.InputDocumentFileLocation({
875 id: doc.id,
876 accessHash: doc.accessHash,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected