This commit is contained in:
parent
e0a63bd7d5
commit
2bb3946237
1 changed files with 5 additions and 1 deletions
6
main.go
6
main.go
|
@ -72,7 +72,11 @@ func main() {
|
|||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
|
||||
bot, err := tgbotapi.NewBotAPIWithAPIEndpoint(os.Getenv("TG_TOKEN"), "https://bot.astra.blue/bot%s/%s")
|
||||
endpoint := "https://api.telegram.org/bot%s/%s"
|
||||
if os.Getenv("TG_API_ENDPOINT") != "" {
|
||||
endpoint = os.Getenv("TG_API_ENDPOINT")
|
||||
}
|
||||
bot, err := tgbotapi.NewBotAPIWithAPIEndpoint(os.Getenv("TG_TOKEN"), endpoint)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue