Compare commits
No commits in common. "d179d759c958dbb8499a19e6663014fe370e5b29" and "6bc45babc5b3ca306ffe4cf60bb8308ce0043206" have entirely different histories.
d179d759c9
...
6bc45babc5
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
.env
|
||||
**.jpg
|
||||
**.db
|
||||
@ -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))
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user