Feat(send-message): First try markdown
All checks were successful
Webhook-Everything/Webhook-Everything/pipeline/head This commit looks good
All checks were successful
Webhook-Everything/Webhook-Everything/pipeline/head This commit looks good
This commit is contained in:
@@ -39,9 +39,18 @@ func (env *Env) TelegramSend(chatIDShort string, msg string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
chatMsg := tgbotapi.NewMessage(chatIDMap.ChatID, msg)
|
chatMsg := tgbotapi.NewMessage(chatIDMap.ChatID, msg)
|
||||||
|
chatMsg.ParseMode = "MarkdownV2"
|
||||||
_, err = bot.Send(chatMsg)
|
_, err = bot.Send(chatMsg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user