package main import ( "git.nix13.pw/scuroneko/laniakea" "kurumibot/database" "kurumibot/plugins" "github.com/joho/godotenv" ) func main() { _ = godotenv.Load(".env", ".env.production", ".env.ai") database.ConnectPostgres() database.ConnectMongo() database.ConnectRedis() bot := laniakea.NewBot(laniakea.LoadSettingsFromEnv()) defer bot.Close() bot = bot.ErrorTemplate("Во время выполнения команды произошла ошибка!\nСообщите об этом разработчику!\n\n%s") bot = bot.DatabaseContext(&laniakea.DatabaseContext{ PostgresSQL: database.PostgresDatabase, MongoDB: database.MongoClient, Redis: database.RedisClient, }) bot.AddDatabaseLogger(plugins.DatabaseLogger) bot.AddMiddleware(plugins.InitLogMiddleware()) plugins.RegisterService(bot) plugins.RegisterAdmin(bot) plugins.RegisterLogs(bot) plugins.RegisterEconomy(bot) //plugins.RegisterRelations(bot) plugins.RegisterWaifus(bot) plugins.RegisterRP(bot) plugins.RegisterAi(bot) plugins.RegisterFun(bot) if err := bot.AutoGenerateCommands(); err != nil { panic(err) } bot.Run() }