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
|
msg.ReplyMarkup = kbd
|
||||||
bc.bot.Send(msg)
|
bc.bot.Send(msg)
|
||||||
} else {
|
} else {
|
||||||
filename := "./" + img + ".jpg"
|
url, _ := bc.bot.GetFileDirectURL(img)
|
||||||
if _, err := os.Stat(filename); errors.Is(err, os.ErrNotExist) {
|
DownloadFile("./preview.jpg", url)
|
||||||
url, _ := bc.bot.GetFileDirectURL(img)
|
msg := tgbotapi.NewPhoto(update.Message.Chat.ID, tgbotapi.FilePath("./preview.jpg"))
|
||||||
DownloadFile(filename, url)
|
|
||||||
}
|
|
||||||
msg := tgbotapi.NewPhoto(update.Message.Chat.ID, tgbotapi.FilePath(filename))
|
|
||||||
msg.Caption = bc.GetBotContent("start")
|
msg.Caption = bc.GetBotContent("start")
|
||||||
msg.ReplyMarkup = kbd
|
msg.ReplyMarkup = kbd
|
||||||
bc.bot.Send(msg)
|
bc.bot.Send(msg)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user