laniakea v0.6
This commit is contained in:
5
main.go
5
main.go
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user