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

Function formatBytes

banana/banana.ts:55–65  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

53};
54
55function estimateMediaSizeBytes(message: Api.Message): number {
56 const doc = (message as any).document;
57 if (doc && typeof doc.size === "number") {
58 return Number(doc.size);
59 }
60
61 const video = (message as any).video;
62 if (video && typeof video.size === "number") {
63 return Number(video.size);
64 }
65
66 const gif = (message as any).gif;
67 if (gif && typeof gif.size === "number") {
68 return Number(gif.size);

Callers 2

handleConfigFunction · 0.70
handleImageEditFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected