Compare commits

..

No commits in common. "d179d759c958dbb8499a19e6663014fe370e5b29" and "6bc45babc5b3ca306ffe4cf60bb8308ce0043206" have entirely different histories.

2 changed files with 3 additions and 9 deletions

3
.gitignore vendored
View File

@ -1,3 +0,0 @@
.env
**.jpg
**.db

View File

@ -139,12 +139,9 @@ func main() {
msg.ReplyMarkup = kbd
bc.bot.Send(msg)
} else {
filename := "./" + img + ".jpg"
if _, err := os.Stat(filename); errors.Is(err, os.ErrNotExist) {
url, _ := bc.bot.GetFileDirectURL(img)
DownloadFile(filename, url)
}
msg := tgbotapi.NewPhoto(update.Message.Chat.ID, tgbotapi.FilePath(filename))
url, _ := bc.bot.GetFileDirectURL(img)
DownloadFile("./preview.jpg", url)
msg := tgbotapi.NewPhoto(update.Message.Chat.ID, tgbotapi.FilePath("./preview.jpg"))
msg.Caption = bc.GetBotContent("start")
msg.ReplyMarkup = kbd
bc.bot.Send(msg)