test
This commit is contained in:
parent
307435a0f8
commit
108fa3332d
18
bot.go
18
bot.go
@ -20,14 +20,7 @@ func StartBot() {
|
||||
return
|
||||
}
|
||||
|
||||
b.Handle("/hello", func(m *tb.Message) {
|
||||
if !m.Private() {
|
||||
return
|
||||
}
|
||||
// fmt.Println("Hello payload :", m.Payload) // <PAYLOAD>
|
||||
PrintText(m)
|
||||
b.Send(m.Sender, "hello world")
|
||||
})
|
||||
b.Handle("/hello", botHello)
|
||||
|
||||
b.Handle(tb.OnPhoto, func(m *tb.Message) {
|
||||
fmt.Println("OnPhoto :", m.Text)
|
||||
@ -53,3 +46,12 @@ func StartBot() {
|
||||
|
||||
b.Start()
|
||||
}
|
||||
|
||||
func botHello(m *tb.Message) {
|
||||
if !m.Private() {
|
||||
return
|
||||
}
|
||||
// fmt.Println("Hello payload :", m.Payload) // <PAYLOAD>
|
||||
PrintText(m)
|
||||
b.Send(m.Sender, "hello world")
|
||||
}
|
Loading…
Reference in New Issue
Block a user