fix: Telegram message error handling

This commit is contained in:
2025-01-17 01:04:49 +03:00
parent 4aea2d0d07
commit 417985c75c

View File

@ -36,11 +36,14 @@ func PollSchedule() {
"Доступно дней: %d\n\n"+
"%s\n",
date,
len(week.Days),
days,
siteUrl)
os.WriteFile(flagFilePath, []byte(msg), os.FileMode(0777))
err = telegram.SendMessage(config.AppConfig.Telegram.ChatId, msg)
if err != nil {
log.Panicln("Unable to send message: ", err)
}
os.WriteFile(flagFilePath, []byte(msg), os.FileMode(0777))
log.Printf("Found %d days", len(week.Days))
}
}