aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-09-20 14:01:39 +0200
committerWilliam Hergès <william@herges.fr>2025-09-20 14:01:39 +0200
commit8d6fa726069bd5364ada1521b400bb5eb7865d87 (patch)
tree9d566cb4cdab6a7069826732ef6d602b40f71dcf /commands
parente8b91140fba414c2bd7e7f36e8cff95d7651732d (diff)
feat(stats): custom scale for Y to show level
Diffstat (limited to 'commands')
-rw-r--r--commands/stats.go4
1 files changed, 4 insertions, 0 deletions
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())