mirror of
https://github.com/purofle/remake_bot.git
synced 2025-06-17 23:03:30 +08:00
fix: initialize remake count
This commit is contained in:
parent
eda80b6650
commit
544a8c711b
@ -21,10 +21,11 @@ type Handler struct {
|
|||||||
remake *Remake
|
remake *Remake
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewHandler(bot *tele.Bot, logger *zap.Logger) *Handler {
|
func NewHandler(bot *tele.Bot, logger *zap.Logger, remake *Remake) *Handler {
|
||||||
return &Handler{
|
return &Handler{
|
||||||
bot: bot,
|
bot: bot,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
|
remake: remake,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,5 +40,8 @@ func NewRemake() *Remake {
|
|||||||
for _, country := range remake.CountryList {
|
for _, country := range remake.CountryList {
|
||||||
remake.TotalPopulation += country.Population
|
remake.TotalPopulation += country.Population
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remake.RemakeCount = make(map[int64]*RemakeData)
|
||||||
|
|
||||||
return &remake
|
return &remake
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user