Added welcome message

This commit is contained in:
Artyom Belousov 2021-06-06 12:43:40 +03:00
parent e69884ce52
commit fa499f577b

View file

@ -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,