go-dette/main.go

27 lines
530 B
Go
Raw Normal View History

2023-01-19 23:12:55 +03:00
package main
import (
"log"
"os"
2023-01-20 00:30:21 +03:00
"git.nefrace.ru/nefrace/nechotron"
"git.nefrace.ru/nefrace/tongo"
"github.com/joho/godotenv"
2023-01-19 23:12:55 +03:00
)
2023-01-24 00:37:27 +03:00
var BuildTime string
2023-01-19 23:12:55 +03:00
func main() {
godotenv.Load()
db, err := tongo.NewConnection(os.Getenv("MONGO_URI"), "godette")
if err != nil {
log.Fatalf("Can't connect to database: %v", err)
}
neco := nechotron.NewTron(os.Getenv("TELEGRAM_TOKEN"), &MainState)
neco.
Use(UserDBUpdater(db)).
Use(UserLogger)
2023-01-22 23:53:20 +03:00
// neko.ApiServer = "http://192.168.100.15:7373"
2023-01-24 00:37:27 +03:00
log.Fatal(neco.DispatchPoll())
2023-01-19 23:12:55 +03:00
}