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

Function messageText

quote/quote.ts:503–509  ·  view source on GitHub ↗
(msg: Api.Message)

Source from the content-addressed store, hash-verified

501function idNumber(value: any): number {
502 const raw = value?.value ?? value;
503 if (typeof raw === "bigint") return Number(raw);
504 if (typeof raw === "number") return raw;
505 const parsed = Number(raw);
506 return Number.isFinite(parsed) ? parsed : 0;
507}
508
509function peerIdNumber(peer: any): number {
510 if (!peer) return 0;
511 return idNumber(peer.userId ?? peer.chatId ?? peer.channelId ?? peer.id ?? peer);
512}

Callers 2

replyPreviewFunction · 0.70
toQuoteMessageFunction · 0.70

Calls 2

getMediaKindFunction · 0.85
mediaFallbackTextFunction · 0.85

Tested by

no test coverage detected