Skip to content

Commit

Permalink
expand scoreboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Distortions81 committed Mar 20, 2024
1 parent 017cc06 commit 72de1bb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions commands/user/scoreBoard.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func Scoreboard(s *discordgo.Session, i *discordgo.InteractionCreate) {
scores := []scoreData{}
glob.PlayerListLock.RLock()
for _, p := range glob.PlayerList {
if p.Minutes > 30 {
if p.Minutes > 4320 {
scores = append(scores, scoreData{Name: p.Name, Score: p.Minutes})
}
}
Expand All @@ -47,9 +47,6 @@ func Scoreboard(s *discordgo.Session, i *discordgo.InteractionCreate) {
numScores := len(scores) - 1
for x := numScores; x >= 0; x-- {
p := scores[x]
if count >= 40 {
break
}

n, _ := durafmt.ParseString(fmt.Sprintf("%vm", p.Score))
timestr := n.Format(units)
Expand All @@ -58,5 +55,5 @@ func Scoreboard(s *discordgo.Session, i *discordgo.InteractionCreate) {
count++
}
buf = buf + "```"
disc.EphemeralResponse(s, i, "Scoreboard: (top 40)", buf)
disc.EphemeralResponse(s, i, "Scoreboard:", buf)
}

0 comments on commit 72de1bb

Please sign in to comment.