From 7fd7daba133b8590975c167cb92f6c0e39594772 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 29 Apr 2019 13:58:36 +0800 Subject: [PATCH] fix --- main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 893477f..0707713 100644 --- a/main.go +++ b/main.go @@ -135,6 +135,9 @@ func ListenCW(c *tdlib.Client) { fmt.Println("ListenCW:", err.Error()) continue } + + txt := updateMsg.Message.Content.(*tdlib.MessageText).Text.Text + t := time.Now() m := ChatWarsMessage{ UserID64 : ownUserID64, @@ -170,8 +173,8 @@ func ListenCW(c *tdlib.Client) { Body: []byte(b), }) - t := time.Now() - txt := updateMsg.Message.Content.(*tdlib.MessageText).Text.Text + + fmt.Printf("[%d-%02d-%02d %02d:%02d:%02d-00:00]", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()) fmt.Println(" === CHATWARS (", user.Username, ") =====================================================================") fmt.Println(txt, "\n")