-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.go
38 lines (36 loc) · 966 Bytes
/
routes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import tele "gopkg.in/telebot.v3"
func IncludeRoutes(b *tele.Bot) {
b.Handle("/start", func(c tele.Context) error {
return c.Send("menu", mainMenu(c))
})
b.Handle("/rbs", func(c tele.Context) error {
markup := *simpleMarkup
markup.Reply(
markup.Row(btnHelp),
markup.Row(btnContact),
markup.Row(btnLocation),
markup.Row(btnPollAny),
markup.Row(btnPollRegular),
markup.Row(btnPollQuiz),
)
return c.Send("Hello!", &markup)
})
b.Handle(&iBtnDataBase, func(c tele.Context) error {
markup := *simpleMarkup
markup.Inline(
markup.Row(iBtnURL, iBtnQuery),
markup.Row(iBtnData()),
markup.Row(iBtnQueryChat),
//markup.Row(iBtnLogin),
)
_, err := b.EditReplyMarkup(c.Message(), &markup)
return err
})
b.Handle(&btnHelp, func(c tele.Context) error {
return c.Send("help!")
})
b.Handle(tele.OnContact, func(c tele.Context) error {
return c.EditOrSend("this is re result of sending you contact!")
})
}