diff --git a/cmd/telegram/main.go b/cmd/telegram/main.go index a6d91a4..133ac17 100644 --- a/cmd/telegram/main.go +++ b/cmd/telegram/main.go @@ -15,6 +15,8 @@ import ( "gitlab.com/flygrounder/go-mtg-vk/internal/telegram" ) +const welcomeMessage = "Здравствуйте, вас приветствует бот для поиска цен на карты MTG, введите название карты, которая вас интересует." + func main() { dict, _ := os.Open("./assets/additional_cards.json") dictBytes, _ := ioutil.ReadAll(dict) @@ -40,6 +42,11 @@ func main() { continue } + if update.Message.Text == "/start" { + sender.Send(update.Message.Chat.ID, welcomeMessage) + continue + } + go sc.HandleSearch(&scenario.UserMessage{ Body: update.Message.Text, UserId: update.Message.Chat.ID,