Closed ghost closed 2 years ago
Tag me pls when a solution is found
In new version (5) you need use struct that implements interface RequestFileData. For example FilePath.
photo := tgbotapi.NewPhoto(update.Message.From.ID, tgbotapi.FilePath("maxresdefault.jpg"))
if _, err = bot.Send(photo); err != nil {
log.Fatalln(err)
}
How can I upload an image? In older versions , it could be done like this: