Compare commits
2 Commits
6bc45babc5
...
d179d759c9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d179d759c9 | ||
|
|
63186db56b |
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.env
|
||||
**.jpg
|
||||
**.db
|
||||
@ -139,9 +139,12 @@ 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("./preview.jpg", url)
|
||||
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.ReplyMarkup = kbd
|
||||
bc.bot.Send(msg)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user