This commit is contained in:
shoopea 2020-06-22 11:02:04 +02:00
parent 97e2cc4d0d
commit 8720e79422

13
bot.go
View File

@ -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