This commit is contained in:
2024-11-04 01:23:57 -06:00
parent af3f3ab355
commit b805f27d0e
10 changed files with 246 additions and 10 deletions

View File

@ -55,6 +55,11 @@ var (
func main() {
godotenv.Load(".env")
err := lib.InitDB()
if err != nil {
log.Fatalf("Failed to initialize database: %v", err)
}
token := os.Getenv("DISCORD_TOKEN")
if token == "" {
@ -83,6 +88,10 @@ func main() {
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
<-sc
if lib.DBClient != nil {
lib.DBClient.Close()
}
dg.Close()
}