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

Function senderEntity

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

Source from the content-addressed store, hash-verified

409 const brandEq = lower.match(/^(?:emoji|brand)[=:]([a-z]+)$/);
410 if (brandEq && QUOTE_EMOJI_BRANDS.has(brandEq[1])) {
411 out.emojiBrand = brandEq[1];
412 continue;
413 }
414
415 const n = Number.parseInt(arg, 10);
416 if (!Number.isNaN(n) && /^[-+]?\d+$/.test(arg)) {
417 out.count = Math.max(-MAX_QUOTE_MESSAGES, Math.min(MAX_QUOTE_MESSAGES, n));
418 continue;
419 }
420 }
421
422 out.emojiSuffix = `${QUOTE_EMOJIS}${EMOJI_SUFFIXES[Math.floor(Math.random() * EMOJI_SUFFIXES.length)]}💜`;
423 return out;
424}
425
426function wantsQuoteHelp(argsText: string): boolean {
427 const t = argsText.trim().toLowerCase();
428 if (!t) return false;

Callers 4

senderNameFunction · 0.85
downloadSenderAvatarFunction · 0.85
replyPreviewFunction · 0.85
toQuoteMessageFunction · 0.85

Calls 4

stableEntityKeyFunction · 0.85
getPeerEntityFunction · 0.85
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected