Explorar o código

优化 BotService 中的错误日志记录,调整消息发送失败时的错误输出格式,以便于更清晰地进行调试。

wuyi hai 3 meses
pai
achega
3e58e8d46b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/services/bot.service.ts

+ 1 - 1
src/services/bot.service.ts

@@ -140,7 +140,7 @@ export class BotService {
     try {
       await this.bot.telegram.sendMessage(chatId, text, { parse_mode: 'HTML' })
     } catch (error) {
-      this.app.log.error('发送消息失败:', error)
+      this.app.log.error(`发送消息失败:${error}`)
     }
   }