diff --git a/bot.go b/bot.go index b00a911..3a822a7 100644 --- a/bot.go +++ b/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) // - 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) @@ -52,4 +45,13 @@ func StartBot() { }) b.Start() +} + +func botHello(m *tb.Message) { + if !m.Private() { + return + } +// fmt.Println("Hello payload :", m.Payload) // + PrintText(m) + b.Send(m.Sender, "hello world") } \ No newline at end of file