how to send message with image
hyahm opened this issue · 2 comments
hyahm commented
CodeExplorerX commented
secondMessageText := "test msg"
photoPath := "./img.jpg"
photoMsg := tgbotapi.NewPhoto(chatID, tgbotapi.FilePath(photoPath))
photoMsg.Caption = secondMessageText
if _, err := bot.Send(photoMsg); err != nil {
log.Printf("Error sending photo: %v", err)
}
hyahm commented
Thanks
