(text: string)
| 70 | <b>快速操作:</b> |
| 71 | • 回复图片/媒体/贴纸使用 <code>.im [delete|ban]</code> - 快速添加(图片MD5/文件MD5/贴纸ID),未指定时使用默认操作`; |
| 72 | |
| 73 | // ==================== 工具函数 ==================== |
| 74 | async function getPeerId(client: TelegramClient, msg: Api.Message, chatIdStr?: string): Promise<string | null> { |
| 75 | try { |
| 76 | if (!chatIdStr) { |
| 77 | if (msg.peerId instanceof Api.PeerChannel) return `-100${msg.peerId.channelId}`; |
| 78 | if (msg.peerId instanceof Api.PeerChat) return `-${msg.peerId.chatId}`; |
| 79 | if (msg.peerId instanceof Api.PeerUser) return `${msg.peerId.userId}`; |
| 80 | return null; |
| 81 | } |
| 82 | |
| 83 | const peer = chatIdStr; |
no outgoing calls
no test coverage detected