Added welcome message
This commit is contained in:
parent
e69884ce52
commit
fa499f577b
1 changed files with 7 additions and 0 deletions
|
|
@ -15,6 +15,8 @@ import (
|
||||||
"gitlab.com/flygrounder/go-mtg-vk/internal/telegram"
|
"gitlab.com/flygrounder/go-mtg-vk/internal/telegram"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const welcomeMessage = "Здравствуйте, вас приветствует бот для поиска цен на карты MTG, введите название карты, которая вас интересует."
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
dict, _ := os.Open("./assets/additional_cards.json")
|
dict, _ := os.Open("./assets/additional_cards.json")
|
||||||
dictBytes, _ := ioutil.ReadAll(dict)
|
dictBytes, _ := ioutil.ReadAll(dict)
|
||||||
|
|
@ -40,6 +42,11 @@ func main() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if update.Message.Text == "/start" {
|
||||||
|
sender.Send(update.Message.Chat.ID, welcomeMessage)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
go sc.HandleSearch(&scenario.UserMessage{
|
go sc.HandleSearch(&scenario.UserMessage{
|
||||||
Body: update.Message.Text,
|
Body: update.Message.Text,
|
||||||
UserId: update.Message.Chat.ID,
|
UserId: update.Message.Chat.ID,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue