Skip to content

Commit

Permalink
feat: add hardcore mode status
Browse files Browse the repository at this point in the history
  • Loading branch information
surskitt committed Jan 3, 2024
1 parent 8319c29 commit cc9539b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion retroachivements.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ type Achievement struct {
}

func formatAchievement(user string, a Achievement) string {
return fmt.Sprintf("%s's last retro achievement: %s (%s) - %s (%s) - %d points", user, a.Title, a.Description, a.GameTitle, a.ConsoleName, a.Points)
out := fmt.Sprintf("%s's last retro achievement: %s (%s) - %s (%s) - %d points", user, a.Title, a.Description, a.GameTitle, a.ConsoleName, a.Points)

if a.HardcoreMode == 1 {
out += " [Hardcore]"
}

return out
}

func ra(apiUser, apiKey, user string) (string, error) {
Expand Down

0 comments on commit cc9539b

Please sign in to comment.