laniakea v0.6

This commit is contained in:
2026-02-18 14:06:58 +03:00
parent dd83373689
commit 57fb633893
12 changed files with 101 additions and 75 deletions

View File

@@ -17,6 +17,7 @@ func main() {
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,
@@ -37,6 +38,8 @@ func main() {
plugins.RegisterAi(bot)
plugins.RegisterFun(bot)
defer bot.Close()
if err := bot.AutoGenerateCommands(); err != nil {
panic(err)
}
bot.Run()
}