diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-01-23 19:09:20 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-01-23 19:09:20 +0100 |
| commit | efaa24393a3e7c999f6706d88a9cba74bfa62980 (patch) | |
| tree | b89fe56cfeebd48a22c057fd13e11347dc0189f3 /commands/stats.go | |
| parent | e8584b80e9638856cda0384f23a3293c2ae14d9e (diff) | |
refactor(commands): deploy when flag is given
Diffstat (limited to 'commands/stats.go')
| -rw-r--r-- | commands/stats.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/stats.go b/commands/stats.go index e74f3e1..017cfc6 100644 --- a/commands/stats.go +++ b/commands/stats.go @@ -62,7 +62,7 @@ func Stats(ctx context.Context, dg bot.Session, i *interaction.ApplicationComman }() opts := i.OptionMap() - if v, ok := opts["days"]; ok { + if v, ok := opts["jours"]; ok { in := v.IntValue() if in < 1 || uint(in) > cfg.DaysXPRemains { msg := fmt.Sprintf("Nombre de jours invalide. Il doit être strictement positif et inférieur à %d", cfg.DaysXPRemains) @@ -76,7 +76,7 @@ func Stats(ctx context.Context, dg bot.Session, i *interaction.ApplicationComman bot.Logger(ctx).Error("sending deferred", "error", err) } var w io.WriterTo - if v, ok := opts["user"]; ok { + if v, ok := opts["copaing"]; ok { w, err = statsMember(ctx, dg, i, days, v.UserValue(ctx).ID) } else { w, err = statsAll(ctx, dg, i, days) |
