🐛 Limit leaderboard to 10 entries

This commit is contained in:
Caleb Denio 2020-12-28 13:22:27 -05:00
parent ed06d3145d
commit 7fd08a6555

View file

@ -135,6 +135,10 @@ func HandleLeaderboardSlashCommand(w http.ResponseWriter, r *http.Request) {
return entries[i].Number > entries[j].Number
})
if len(entries) > 10 {
entries = entries[:10]
}
blocks := []slack.Block{
slack.NewSectionBlock(
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf(":chart_with_upwards_trend: Counting stats for *%s %d*:", month.String(), year), false, false),