aboutsummaryrefslogtreecommitdiff
path: root/commands/config.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus@anhgelus.world>2025-05-13 12:50:20 +0200
committerAnhgelus Morhtuuzh <anhgelus@anhgelus.world>2025-05-13 12:50:20 +0200
commitc408afc8797b0da5e1d73d190a8f5884870b510c (patch)
treeb87eb4aab9f3e1f89bea29a2ce846efe324f7374 /commands/config.go
parent0a445aa1c73bc1410899c53778ae090a24c38dac (diff)
style(files): reorganize everything
Diffstat (limited to 'commands/config.go')
-rw-r--r--commands/config.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/config.go b/commands/config.go
index 1e680c7..32da9c6 100644
--- a/commands/config.go
+++ b/commands/config.go
@@ -5,7 +5,7 @@ import (
"github.com/anhgelus/gokord"
"github.com/anhgelus/gokord/utils"
"github.com/anhgelus/les-copaings-bot/config"
- "github.com/anhgelus/les-copaings-bot/xp"
+ "github.com/anhgelus/les-copaings-bot/exp"
"github.com/bwmarrin/discordgo"
"strings"
)
@@ -17,9 +17,9 @@ func ConfigShow(s *discordgo.Session, i *discordgo.InteractionCreate) {
l := len(cfg.XpRoles) - 1
for i, r := range cfg.XpRoles {
if i == l {
- roles += fmt.Sprintf("> Niveau %d - <@&%s>", xp.Level(r.XP), r.RoleID)
+ roles += fmt.Sprintf("> Niveau %d - <@&%s>", exp.Level(r.XP), r.RoleID)
} else {
- roles += fmt.Sprintf("> Niveau %d - <@&%s>\n", xp.Level(r.XP), r.RoleID)
+ roles += fmt.Sprintf("> Niveau %d - <@&%s>\n", exp.Level(r.XP), r.RoleID)
}
}
if len(roles) == 0 {
@@ -98,7 +98,7 @@ func ConfigXP(s *discordgo.Session, i *discordgo.InteractionCreate) {
}
return
}
- exp := xp.XPForLevel(uint(level))
+ exp := exp.LevelXP(uint(level))
r, ok := optMap["role"]
if !ok {
err := resp.Message("Le rôle n'a pas été renseigné.").Send()