reportar errores subiendo a telegram
This commit is contained in:
parent
e032af2388
commit
2e61e51be9
1 changed files with 4 additions and 1 deletions
5
main.go
5
main.go
|
@ -61,7 +61,10 @@ func (config Config) handleMessage(bot *tgbotapi.BotAPI, update tgbotapi.Update)
|
||||||
res := tgbotapi.NewVideo(update.Message.Chat.ID, tgbotapi.FileURL(uploadable.Url))
|
res := tgbotapi.NewVideo(update.Message.Chat.ID, tgbotapi.FileURL(uploadable.Url))
|
||||||
res.ReplyToMessageID = update.Message.MessageID
|
res.ReplyToMessageID = update.Message.MessageID
|
||||||
res.Caption = uploadable.Caption
|
res.Caption = uploadable.Caption
|
||||||
bot.Send(res)
|
_, err := bot.Send(res)
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Error subiendo", url.String(), err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if explicit && érror == common.NotValid {
|
if explicit && érror == common.NotValid {
|
||||||
|
|
Reference in a new issue