(text: string)
| 3 | import { safeGetReplyMessage } from "@utils/safeGetMessages"; |
| 4 | |
| 5 | import { htmlEscape } from "@utils/htmlEscape"; |
| 6 | |
| 7 | const gt = async (msg: Api.Message) => { |
| 8 | let translate: any; |
| 9 | |
| 10 | try { |
| 11 | // 动态导入翻译库 |
| 12 | const translateModule = await import("@vitalets/google-translate-api"); |
| 13 | translate = translateModule.translate || translateModule.default; |
| 14 | |
| 15 | if (!translate || typeof translate !== "function") { |