This commit is contained in:
shoopea 2019-05-10 10:45:31 +08:00
parent 43d8be2e35
commit ae3887c83f

11
bot.go
View File

@ -21,16 +21,7 @@ func StartBot() {
failOnError(err, "StartBot") failOnError(err, "StartBot")
b.Handle("/hello", func(m *tb.Message) { b.Handle("/hello", func(m *tb.Message) {
fmt.Println("botHello :", m.Text) botHello(m)
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("/rescan_msg", *botRescanMsg)