hdkv
/
i2_bot
Archived
1
Fork 0

Fixing endpoint for setWebhook

master
Vladimir Hodakov 2018-01-31 00:17:59 +04:00
parent 88e640d322
commit 38416b3902
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ func main() {
c.Cron.Start()
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 {
c.Log.Fatal(err.Error())
}
@ -66,7 +66,7 @@ func main() {
go http.ListenAndServe(c.Cfg.Telegram.ListenAddress, nil)
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 {
if update.Message != nil {

View File

@ -1,6 +1,6 @@
telegram_connection:
api_token: "your-awesome-token"
webhook_domain: "https://i2bot.wtfteam.pro"
webhook_domain: "https://i2bot.wtfteam.pro/"
listen_address: "0.0.0.0:5000"
database_connection:
host: "localhost"