Skip to content

添加更多数据,修改发送排版 #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions plugin/epidemic/epidemic.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ type area struct {
Name string `json:"name"`
Today struct {
Confirm int `json:"confirm"`
Wzzadd int `json:"wzz_add"`
} `json:"today"`
Total struct {
NowConfirm int `json:"nowConfirm"`
Confirm int `json:"confirm"`
Dead int `json:"dead"`
Heal int `json:"heal"`
Grade string `json:"grade"`
Wzz int `json:"wzz"`
} `json:"total"`
Children []*area `json:"children"`
}
Expand Down Expand Up @@ -71,12 +73,14 @@ func init() {
ctx.SendChain(
message.Text(
"【", data.Name, "】疫情数据\n",
"新增:", data.Today.Confirm, " ,",
"现有确诊:", data.Total.NowConfirm, " ,",
"治愈:", data.Total.Heal, " ,",
"死亡:", data.Total.Dead, " ", data.Total.Grade, "\n",
"更新时间:", time, "\n",
"温馨提示:请大家做好防疫工作,出门带好口罩!",
"新增人数:", data.Today.Confirm, "\n",
"现有确诊:", data.Total.NowConfirm, "\n",
"累计确诊:", data.Total.Confirm, "\n",
"治愈人数:", data.Total.Heal, "\n",
"死亡人数:", data.Total.Dead, "\n",
"无症状人数:", data.Total.Wzz, "\n",
"新增无症状:", data.Today.Wzzadd, "\n",
"更新时间:\n『", time, "』",
),
)
})
Expand Down