remove unnecessary notification during setup
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3867112ca1
commit
8e2b6dde22
@ -18,9 +18,11 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
labels:
|
labels:
|
||||||
traefik.enable: "true"
|
traefik.enable: "true"
|
||||||
traefik.http.routers.vegapokerbot.entrypoints: web
|
traefik.http.routers.vegapokerbot.rule: Host(`vegapokerbot.neur0tx.site`) && PathPrefix(`/webhook8c31c4b2d65a87b4f3a6f10f8eb166fba9a2e5dc7696bc5291a7e69641dc5c21`)
|
||||||
traefik.http.routers.vegapokerbot.rule: "Host(`example.com`) && PathPrefix(`/webhook`)"
|
traefik.http.routers.vegapokerbot.entrypoints: websecure
|
||||||
traefik.http.services.vegapokerbot.loadbalancer.server.port: 3333
|
traefik.http.services.vegapokerbot.loadbalancer.server.port: "3333"
|
||||||
|
traefik.http.routers.vegapokerbot.tls: true
|
||||||
|
traefik.http.routers.vegapokerbot.tls.certresolver: letsencrypt
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface"
|
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface"
|
||||||
"github.com/mymmrac/telego"
|
"github.com/mymmrac/telego"
|
||||||
tu "github.com/mymmrac/telego/telegoutil"
|
tu "github.com/mymmrac/telego/telegoutil"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UnknownCommand struct {
|
type UnknownCommand struct {
|
||||||
@ -15,6 +16,9 @@ func NewUnknownCommand(app iface.App, userID, chatID int64) *UnknownCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *UnknownCommand) Handle(wh telego.Update) error {
|
func (h *UnknownCommand) Handle(wh telego.Update) error {
|
||||||
|
if !strings.HasPrefix(wh.Message.Text, "/") {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
_, err := h.App.TG().SendMessage(&telego.SendMessageParams{
|
_, err := h.App.TG().SendMessage(&telego.SendMessageParams{
|
||||||
ChatID: tu.ID(wh.Message.Chat.ID),
|
ChatID: tu.ID(wh.Message.Chat.ID),
|
||||||
Text: h.Localizer(wh.Message.From.LanguageCode).Message("unknown_command"),
|
Text: h.Localizer(wh.Message.From.LanguageCode).Message("unknown_command"),
|
||||||
|
Loading…
Reference in New Issue
Block a user