diff --git a/cmd/bot/main.go b/cmd/bot/main.go index 709f1d7..4067905 100644 --- a/cmd/bot/main.go +++ b/cmd/bot/main.go @@ -2,6 +2,7 @@ package main import ( "context" + "net" "net/http" "net/url" "os" @@ -120,7 +121,7 @@ func NewBot() (bot *Bot, errch chan error, err error) { } bot.AttachHandlers()*/ go func() { - _ = http.ListenAndServe(":3117", &interceptor{mux}) + _ = http.ListenAndServe(net.JoinHostPort(conf.Service.Webhook.Host, conf.Service.Webhook.Port), &interceptor{mux}) }() bot.Handler, err = th.NewBotHandler(b, updates) diff --git a/internal/settings/settings.go b/internal/settings/settings.go index fc416ba..f25d041 100644 --- a/internal/settings/settings.go +++ b/internal/settings/settings.go @@ -43,7 +43,7 @@ type Service struct { type Webhook struct { URI string `toml:"uri"` - Port int `toml:"port"` + Port string `toml:"port"` Host string `toml:"host"` }