Skip to content

Commit

Permalink
过滤流量为0的用户
Browse files Browse the repository at this point in the history
  • Loading branch information
morooi committed Jan 7, 2024
1 parent 69446fd commit 8e1c96e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func QueryXrayStatsHandler(c tele.Context) error {
for _, traffic := range userTrafficList {
userTotal := traffic.Up + traffic.Down
total = total + userTotal
if total == 0 {
if userTotal == 0 {
continue
}
trafficInfo := fmt.Sprintf("*%s*:%s", ReplaceForMarkdownV2(traffic.User), ReplaceForMarkdownV2(calculateTraffic(userTotal)))
Expand Down

0 comments on commit 8e1c96e

Please sign in to comment.