This commit is contained in:
shoopea 2019-05-10 10:50:40 +08:00
parent a71e4cf696
commit bdc75004b8

6
bot.go
View File

@ -38,7 +38,7 @@ func botPhoto(m *tb.Message) {
// photos only
}
func botHello(m *tb.Message) {
func botHello(m *tb.Message) (string, error) {
fmt.Println("botHello :", m.Text)
if !m.Private() {
fmt.Println("botHello : !m.Private()")
@ -46,9 +46,7 @@ func botHello(m *tb.Message) {
}
// 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")
return "hello world", nil
}
func botChannelPost(m *tb.Message) {