Feat(send-message): First try markdown
All checks were successful
Webhook-Everything/Webhook-Everything/pipeline/head This commit looks good

This commit is contained in:
2025-12-08 02:03:33 +08:00
parent c9ba5c4312
commit 61ee85b606

View File

@@ -39,9 +39,18 @@ func (env *Env) TelegramSend(chatIDShort string, msg string) error {
return err
}
chatMsg := tgbotapi.NewMessage(chatIDMap.ChatID, msg)
chatMsg.ParseMode = "MarkdownV2"
_, err = bot.Send(chatMsg)
if err != nil {
log.Println(err)
chatMsg.ParseMode = ""
log.Println("Retrying without parse mode")
_, err = bot.Send(chatMsg)
if err != nil {
log.Println(err)
return err
}
}
return nil
}