From 8d6fa726069bd5364ada1521b400bb5eb7865d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sat, 20 Sep 2025 14:01:39 +0200 Subject: feat(stats): custom scale for Y to show level --- commands/stats.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'commands/stats.go') diff --git a/commands/stats.go b/commands/stats.go index e2c2ba4..3156fd9 100644 --- a/commands/stats.go +++ b/commands/stats.go @@ -47,6 +47,9 @@ var colors = []color.RGBA{ func Stats(s *discordgo.Session, i *discordgo.InteractionCreate, opt cmd.OptionMap, resp *cmd.ResponseBuilder) { cfg := config.GetGuildConfig(i.GuildID) days := 15 + if gokord.Debug { + days = 90 + } if v, ok := opt["days"]; ok { in := v.IntValue() if in < 1 || uint(in) > cfg.DaysXPRemains { @@ -195,6 +198,7 @@ func generatePlot(s *discordgo.Session, i *discordgo.InteractionCreate, copaings p.X.Label.Text = "Secondes" } p.Y.Label.Text = "XP" + p.Y.Scale = exp.LevelScale{} p.Add(plotter.NewGrid()) -- cgit v1.2.3