diff --git a/compose.prod.yml b/compose.prod.yml index e0e93e2..c5ac712 100644 --- a/compose.prod.yml +++ b/compose.prod.yml @@ -18,9 +18,11 @@ services: - .env labels: traefik.enable: "true" - traefik.http.routers.vegapokerbot.entrypoints: web - traefik.http.routers.vegapokerbot.rule: "Host(`example.com`) && PathPrefix(`/webhook`)" - traefik.http.services.vegapokerbot.loadbalancer.server.port: 3333 + traefik.http.routers.vegapokerbot.rule: Host(`vegapokerbot.neur0tx.site`) && PathPrefix(`/webhook8c31c4b2d65a87b4f3a6f10f8eb166fba9a2e5dc7696bc5291a7e69641dc5c21`) + traefik.http.routers.vegapokerbot.entrypoints: websecure + traefik.http.services.vegapokerbot.loadbalancer.server.port: "3333" + traefik.http.routers.vegapokerbot.tls: true + traefik.http.routers.vegapokerbot.tls.certresolver: letsencrypt networks: default: diff --git a/internal/handler/wizard/unknown_command.go b/internal/handler/wizard/unknown_command.go index cd30525..eb04464 100644 --- a/internal/handler/wizard/unknown_command.go +++ b/internal/handler/wizard/unknown_command.go @@ -4,6 +4,7 @@ import ( "gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface" "github.com/mymmrac/telego" tu "github.com/mymmrac/telego/telegoutil" + "strings" ) type UnknownCommand struct { @@ -15,6 +16,9 @@ func NewUnknownCommand(app iface.App, userID, chatID int64) *UnknownCommand { } func (h *UnknownCommand) Handle(wh telego.Update) error { + if !strings.HasPrefix(wh.Message.Text, "/") { + return nil + } _, err := h.App.TG().SendMessage(&telego.SendMessageParams{ ChatID: tu.ID(wh.Message.Chat.ID), Text: h.Localizer(wh.Message.From.LanguageCode).Message("unknown_command"),