Fixing endpoint for setWebhook
This commit is contained in:
parent
88e640d322
commit
38416b3902
@ -57,7 +57,7 @@ func main() {
|
|||||||
c.Cron.Start()
|
c.Cron.Start()
|
||||||
c.Log.Info("> Cron started.")
|
c.Log.Info("> Cron started.")
|
||||||
|
|
||||||
_, err := c.Bot.SetWebhook(tgbotapi.NewWebhook(c.Cfg.Telegram.WebHookDomain))
|
_, err := c.Bot.SetWebhook(tgbotapi.NewWebhook(c.Cfg.Telegram.WebHookDomain + c.Bot.Token))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Log.Fatal(err.Error())
|
c.Log.Fatal(err.Error())
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ func main() {
|
|||||||
go http.ListenAndServe(c.Cfg.Telegram.ListenAddress, nil)
|
go http.ListenAndServe(c.Cfg.Telegram.ListenAddress, nil)
|
||||||
|
|
||||||
c.Log.Info("Listening on " + c.Cfg.Telegram.ListenAddress)
|
c.Log.Info("Listening on " + c.Cfg.Telegram.ListenAddress)
|
||||||
c.Log.Info("Webhook URL: " + c.Cfg.Telegram.WebHookDomain)
|
c.Log.Info("Webhook URL: " + c.Cfg.Telegram.WebHookDomain + c.Bot.Token)
|
||||||
|
|
||||||
for update := range updates {
|
for update := range updates {
|
||||||
if update.Message != nil {
|
if update.Message != nil {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
telegram_connection:
|
telegram_connection:
|
||||||
api_token: "your-awesome-token"
|
api_token: "your-awesome-token"
|
||||||
webhook_domain: "https://i2bot.wtfteam.pro"
|
webhook_domain: "https://i2bot.wtfteam.pro/"
|
||||||
listen_address: "0.0.0.0:5000"
|
listen_address: "0.0.0.0:5000"
|
||||||
database_connection:
|
database_connection:
|
||||||
host: "localhost"
|
host: "localhost"
|
||||||
|
Reference in New Issue
Block a user