15 lines
223 B
Go
15 lines
223 B
Go
package middlewares
|
|
|
|
import (
|
|
"gopkg.in/telebot.v3"
|
|
)
|
|
|
|
func IgnoreBot(next telebot.HandlerFunc) telebot.HandlerFunc {
|
|
return func(c telebot.Context) error {
|
|
if c.Sender().IsBot {
|
|
return nil
|
|
}
|
|
return next(c)
|
|
}
|
|
}
|