test
This commit is contained in:
parent
a7bbbfd72a
commit
41413bd3ca
6
bot.go
6
bot.go
@ -32,6 +32,7 @@ func BotHandlers(b *tb.Bot) {
|
|||||||
b.Handle(tb.OnChannelPost, botChannelPost)
|
b.Handle(tb.OnChannelPost, botChannelPost)
|
||||||
b.Handle(tb.OnQuery, botQuery)
|
b.Handle(tb.OnQuery, botQuery)
|
||||||
b.Handle(tb.OnText, botText)
|
b.Handle(tb.OnText, botText)
|
||||||
|
b.Handle(tb.OnDocument, botDocument)
|
||||||
|
|
||||||
b.Start()
|
b.Start()
|
||||||
}
|
}
|
||||||
@ -41,6 +42,11 @@ func botPhoto(m *tb.Message) {
|
|||||||
// photos only
|
// photos only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func botDocument(m *tb.Message) {
|
||||||
|
fmt.Printf("botDocument : %s (%d - %s)", m.Document.FileName, m.Document.File.FileSize, m.Document.File.FilePath)
|
||||||
|
// documents only
|
||||||
|
}
|
||||||
|
|
||||||
func botHello(m *tb.Message) (string, error) {
|
func botHello(m *tb.Message) (string, error) {
|
||||||
fmt.Println("botHello :", m.Text)
|
fmt.Println("botHello :", m.Text)
|
||||||
if !m.Private() {
|
if !m.Private() {
|
||||||
|
Loading…
Reference in New Issue
Block a user