aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-08-21 14:53:18 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-08-21 14:53:18 +0200
commit15448aa0014e1473582227e2ea301df7ccfb9560 (patch)
treebc77b8e3f7a7599ad272fcc3c0032f3258ff7cd7
parentecf41adc3c2b8746867a16c8d3c5a09ca89bc534 (diff)
fix(config): saving level and not xp for role
-rw-r--r--config/xp_role.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/xp_role.go b/config/xp_role.go
index dac980c..f815cc2 100644
--- a/config/xp_role.go
+++ b/config/xp_role.go
@@ -9,6 +9,7 @@ import (
"github.com/anhgelus/gokord/cmd"
"github.com/anhgelus/gokord/component"
"github.com/anhgelus/gokord/logger"
+ "github.com/anhgelus/les-copaings-bot/exp"
"github.com/bwmarrin/discordgo"
)
@@ -189,7 +190,7 @@ func HandleXpRoleLevel(_ *discordgo.Session, i *discordgo.InteractionCreate, dat
}
return
}
- configModifyMap[k] = uint(in)
+ configModifyMap[k] = exp.LevelXP(uint(in))
go func(i *discordgo.InteractionCreate, k string) {
time.Sleep(5 * time.Minute)
delete(configModifyMap, k)