From de079c92b1f7c8b06fd0173e48d43a84033da293 Mon Sep 17 00:00:00 2001 From: johlanse Date: Sat, 27 Nov 2021 16:34:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0telegram=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- lib/score.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ea9e3e..c067903 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,8 @@ push: enable: true token: "" - +# 通过telegram进行交互模式,当配置tg.enable为true时会自动注册bot命令, +# telegram_bot使用教程https://www.dazhuanlan.com/leemode/topics/927496 tg: enable: false chat_id: 0 diff --git a/lib/score.go b/lib/score.go index bc2c503..14d2670 100644 --- a/lib/score.go +++ b/lib/score.go @@ -99,7 +99,7 @@ func GetUserScore(cookies []Cookie) (Score, error) { func PrintScore(score Score) string { result := "" - result += fmt.Sprintf("当前学习总积分:%d 今日得分:%d\n", score.TodayScore, score.TodayScore) + result += fmt.Sprintf("当前学习总积分:%d 今日得分:%d\n", score.TotalScore, score.TodayScore) result += fmt.Sprintf("[%v] [INFO]: 登录:%v/%v 文章学习:%v/%v 视频学习:%v/%v 视频时长:%v/%v\n[%v] [INFO]: 每日答题:%v/%v 每周答题:%v/%v 专项答题:%v/%v", time.Now().Format("2006-01-02 15:04:05"), score.Content["login"].CurrentScore, score.Content["login"].MaxScore, @@ -117,7 +117,7 @@ func PrintScore(score Score) string { func foramet_score(score Score) string { result := "" - result += fmt.Sprintf("当前学习总积分:%d 今日得分:%d\n", score.TodayScore, score.TodayScore) + result += fmt.Sprintf("当前学习总积分:%d 今日得分:%d\n", score.TotalScore, score.TodayScore) result += fmt.Sprintf("登录:%v/%v 文章学习:%v/%v 视频学习:%v/%v 视频时长:%v/%v\n每日答题:%v/%v 每周答题:%v/%v 专项答题:%v/%v", score.Content["login"].CurrentScore, score.Content["login"].MaxScore, score.Content["article"].CurrentScore, score.Content["article"].MaxScore,