test
This commit is contained in:
parent
6ac4a78e0d
commit
7c13208cc1
14
bot.go
14
bot.go
@ -20,7 +20,19 @@ func StartBot() {
|
||||
|
||||
failOnError(err, "StartBot")
|
||||
|
||||
b.Handle("/hello", botHello)
|
||||
b.Handle("/hello", func(m *tb.Message) {
|
||||
fmt.Println("botHello :", m.Text)
|
||||
if !m.Private() {
|
||||
fmt.Println("botHello : !m.Private()")
|
||||
return
|
||||
}
|
||||
// fmt.Println("Hello payload :", m.Payload) // <PAYLOAD>
|
||||
PrintText(m)
|
||||
m, err := b.Send(m.Sender, "hello world")
|
||||
logOnError(err, "botHello")
|
||||
fmt.Println("botHello : hello world")
|
||||
})
|
||||
|
||||
b.Handle("/rescan_msg", botRescanMsg)
|
||||
b.Handle(tb.OnPhoto, botPhoto)
|
||||
b.Handle(tb.OnChannelPost, botChannelPost)
|
||||
|
Loading…
Reference in New Issue
Block a user