(
msg: Api.Message,
originalText: string,
result: string,
typeName: string,
operation: string,
icon: string
)
| 173 | typeName: string, |
| 174 | operation: string, |
| 175 | icon: string |
| 176 | ): Promise<void> { |
| 177 | const operationText = operation === "encode" ? "编码" : "解码"; |
| 178 | const originalPreview = originalText.length > 200 ? originalText.substring(0, 200) + "..." : originalText; |
| 179 | const resultPreview = result.length > 3000 ? result.substring(0, 3000) + "..." : result; |
| 180 | |
| 181 | await msg.edit({ |
| 182 | text: `${icon} <b>${typeName} ${operationText}完成</b>\n\n<b>原文:</b>\n<code>${htmlEscape(originalPreview)}</code>\n\n<b>结果:</b>\n<code>${htmlEscape(resultPreview)}</code>\n\n${result.length > 3000 ? `⚠️ 结果过长,已截取前3000字符显示` : ""}`, |
| 183 | parseMode: "html" |
| 184 | }); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | export default new EncodePlugin(); |
no test coverage detected