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

Function wrapWithSpoiler

sum/sum.ts:653–665  ·  view source on GitHub ↗
(content: string, useSpoiler: boolean)

Source from the content-addressed store, hash-verified

651
652 return false;
653}
654
655// 从消息中提取文件名
656function extractFileName(message: any): string | null {
657 if (!message.media) return null;
658
659 // 忽略贴纸/表情包
660 if (isStickerOrEmoji(message)) {
661 return null;
662 }
663
664 // MessageMediaDocument(文件、图片等)
665 if (message.media.document) {
666 const doc = message.media.document;
667 // 从 attributes 中查找文件名
668 if (doc.attributes && Array.isArray(doc.attributes)) {

Callers 2

executeSummaryFunction · 0.85
SummaryPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected