This commit is contained in:
shoopea 2020-01-03 00:00:51 +08:00
parent daa659e7a4
commit 62e2698ea5
2 changed files with 4 additions and 4 deletions

View File

@ -136,6 +136,10 @@ func main() {
_, _ = addObjGuild(``, `No Guild`) _, _ = addObjGuild(``, `No Guild`)
} }
log.Println("Caching castles ..")
err = loadObjCastle()
logOnError(err, "initCache : caching castles")
// Registering bot // Registering bot
bot, err := tb.NewBot(tb.Settings{ bot, err := tb.NewBot(tb.Settings{
Token: cfg.Telegram.Token, Token: cfg.Telegram.Token,

4
obj.go
View File

@ -42,10 +42,6 @@ func initCache() {
msgParsingRules, err = loadMsgParsingRules() msgParsingRules, err = loadMsgParsingRules()
logOnError(err, "initCache : message parsing rules") logOnError(err, "initCache : message parsing rules")
log.Println("Caching castles ..")
err = loadObjCastle()
logOnError(err, "initCache : caching castles")
log.Println("Caching guilds ..") log.Println("Caching guilds ..")
err = loadObjGuild() err = loadObjGuild()
logOnError(err, "initCache : caching guilds") logOnError(err, "initCache : caching guilds")