diff options
| author | William Hergès <william@herges.fr> | 2025-08-31 17:27:14 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-08-31 17:27:14 +0200 |
| commit | 22ebfcf0c9b309a1b14ea9b8fa39f15b610eb0ce (patch) | |
| tree | 78340f476703fd46175f73d81f3f5cb0a265473c /commands/stats.go | |
| parent | 59ba978ba78b56e9195946b5bb12011a7a936294 (diff) | |
style(stats): remove useless parts
Diffstat (limited to 'commands/stats.go')
| -rw-r--r-- | commands/stats.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/commands/stats.go b/commands/stats.go index 34734b0..cde49a1 100644 --- a/commands/stats.go +++ b/commands/stats.go @@ -169,10 +169,10 @@ func stats(s *discordgo.Session, i *discordgo.InteractionCreate, days uint, exec Y: float64(raw.XP), } } - return generatePlot(s, i, days, copaings, stats) + return generatePlot(s, i, copaings, stats) } -func generatePlot(s *discordgo.Session, i *discordgo.InteractionCreate, days uint, copaings map[int]*user.Copaing, stats map[int][]plotter.XY) (io.WriterTo, error) { +func generatePlot(s *discordgo.Session, i *discordgo.InteractionCreate, copaings map[int]*user.Copaing, stats map[int][]plotter.XY) (io.WriterTo, error) { p := plot.New() p.Title.Text = "Évolution de l'XP" p.X.Label.Text = "Jours" @@ -199,18 +199,6 @@ func generatePlot(s *discordgo.Session, i *discordgo.InteractionCreate, days uin } return 0 }) - //first := stats[in][0] - //if first.X > float64(-days) { - // stats[in] = append([]plotter.XY{{ - // X: first.X - 1, Y: 0, - // }}, stats[in]...) - //} - //last := stats[in][len(stats[in])-1] - //if last.X <= -1 { - // stats[in] = append(stats[in], plotter.XY{ - // X: last.X + 1, Y: 0, - // }) - //} l, err := plotter.NewLine(plotter.XYs(stats[in])) if err != nil { logger.Alert("commands/stats.go - Adding line points", err.Error()) |
