vegapokerbot/internal/handler/noop.go
2024-05-07 22:07:53 +03:00

24 lines
418 B
Go

package handler
import (
"github.com/mymmrac/telego"
"go.uber.org/zap"
)
type NoopHandler struct {
logger *zap.SugaredLogger
debug bool
}
func NewNoopHandler(logger *zap.SugaredLogger, debug bool) *NoopHandler {
return &NoopHandler{logger: logger, debug: debug}
}
func (h *NoopHandler) Handle(update telego.Update) error {
if h.debug {
h.logger.Debugf("unsupported update: %+v", update)
}
return nil
}