From a8844b4f71fd781cec68e0eb7be01bf9d5c52b64 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 8 Nov 2021 22:24:34 +0800 Subject: [PATCH] update --- bot.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bot.go b/bot.go index f5f878f..540a37c 100644 --- a/bot.go +++ b/bot.go @@ -146,10 +146,10 @@ func botClients(m *tb.Message) { } func botPlayers(m *tb.Message) { - t := time.Now().Sub(cfg.Game.StartDate) - days := int(time.Duration(t.Hours()) / 24) - t = time.Duration(days+1)*(time.Hour)*24 - t - str := fmt.Sprintf("Update in %s\r\n", t) + d1 := time.Now().Sub(cfg.Game.StartDate) + days := int(time.Duration(d1.Hours()) / 24) + d2 := time.Duration(days+1)*(time.Hour)*24 - d1 + str := fmt.Sprintf("Update in %s\r\n", d2) online := "" for _, cc := range cfg.Clients {