Init commit

This commit is contained in:
Archie Fox
2025-05-21 19:35:54 +03:00
commit 7e94d8bd48
5 changed files with 153 additions and 0 deletions

27
main.go Normal file
View File

@@ -0,0 +1,27 @@
package main
import (
"flag"
"log"
"tgbot/clients/telegram"
)
const (
tgBotHost = "api.telegram.org"
)
func main() {
tgClient = telegram.New(tgBotHost, mustToken())
}
func mustToken() string {
token := flag.String("token-bot-token", "", "token for access to telegram bot")
flag.Parse()
if *token == "" {
log.Fatal("token is not specified")
}
return *token
}