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

Method getMessage

save/save.ts:513–523  ·  view source on GitHub ↗
(chatId: string, messageId: number)

Source from the content-addressed store, hash-verified

511 if (media.type === 'photo') return 'photo';
512 if (media.type === 'video') return 'video';
513 if (media.type === 'audio') return 'audio';
514 if (media.type === 'voice') return 'voice';
515 if (media.type === 'sticker') return 'sticker';
516 if (media.type === 'document') {
517 if (media.mimeType?.includes('video/')) return 'video';
518 if (media.mimeType?.includes('audio/')) return 'audio';
519 if (media.mimeType?.includes('image/')) return 'photo';
520 if (media.mimeType?.includes('image/gif')) return 'gif';
521 }
522 } catch (error: unknown) {
523 logger.error(`获取媒体类型失败:`, error);
524 }
525
526 return 'document';

Callers 3

processMessageRangeMethod · 0.95
handleCommandMethod · 0.95

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected