|
|
@ -3,6 +3,7 @@ package main |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"log" |
|
|
|
"log" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
|
tb "gopkg.in/tucnak/telebot.v2" |
|
|
|
tb "gopkg.in/tucnak/telebot.v2" |
|
|
|
) |
|
|
|
) |
|
|
@ -12,7 +13,6 @@ func main() { |
|
|
|
port = os.Getenv("PORT") |
|
|
|
port = os.Getenv("PORT") |
|
|
|
publicURL = os.Getenv("PUBLIC_URL") // you must add it to your config vars
|
|
|
|
publicURL = os.Getenv("PUBLIC_URL") // you must add it to your config vars
|
|
|
|
token = os.Getenv("TOKEN") // you must add it to your config vars
|
|
|
|
token = os.Getenv("TOKEN") // you must add it to your config vars
|
|
|
|
apiURL = os.Getenv("API_URL") |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
webhook := &tb.Webhook{ |
|
|
|
webhook := &tb.Webhook{ |
|
|
@ -23,7 +23,6 @@ func main() { |
|
|
|
pref := tb.Settings{ |
|
|
|
pref := tb.Settings{ |
|
|
|
Token: token, |
|
|
|
Token: token, |
|
|
|
Poller: webhook, |
|
|
|
Poller: webhook, |
|
|
|
URL: apiURL, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
b, err := tb.NewBot(pref) |
|
|
|
b, err := tb.NewBot(pref) |
|
|
|