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