test
This commit is contained in:
parent
97e2cc4d0d
commit
8720e79422
13
bot.go
13
bot.go
@ -8,6 +8,9 @@ import (
|
||||
|
||||
func BotHandlers(b *tb.Bot) {
|
||||
|
||||
b.Handle("/pause", botPause)
|
||||
b.Handle("/unpause", botUnpause)
|
||||
|
||||
b.Handle(tb.OnPhoto, botPhoto)
|
||||
b.Handle(tb.OnChannelPost, botChannelPost)
|
||||
b.Handle(tb.OnQuery, botQuery)
|
||||
@ -17,6 +20,16 @@ func BotHandlers(b *tb.Bot) {
|
||||
b.Start()
|
||||
}
|
||||
|
||||
func botPause(m *tb.Message) {
|
||||
forcePaused = true
|
||||
return
|
||||
}
|
||||
|
||||
func botUnpause(m *tb.Message) {
|
||||
forcePaused = false
|
||||
return
|
||||
}
|
||||
|
||||
func PrintText(m *tb.Message) {
|
||||
logInfoDebug("[%d] %s(%d) | %s(%d) : %s\n", m.ID, m.Chat.Title, m.Chat.ID, m.Sender.Username, m.Sender.ID, m.Text)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user