fix(config): saving level and not xp for role
This commit is contained in:
parent
ecf41adc3c
commit
15448aa001
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import (
|
||||||
"github.com/anhgelus/gokord/cmd"
|
"github.com/anhgelus/gokord/cmd"
|
||||||
"github.com/anhgelus/gokord/component"
|
"github.com/anhgelus/gokord/component"
|
||||||
"github.com/anhgelus/gokord/logger"
|
"github.com/anhgelus/gokord/logger"
|
||||||
|
"github.com/anhgelus/les-copaings-bot/exp"
|
||||||
"github.com/bwmarrin/discordgo"
|
"github.com/bwmarrin/discordgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -189,7 +190,7 @@ func HandleXpRoleLevel(_ *discordgo.Session, i *discordgo.InteractionCreate, dat
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
configModifyMap[k] = uint(in)
|
configModifyMap[k] = exp.LevelXP(uint(in))
|
||||||
go func(i *discordgo.InteractionCreate, k string) {
|
go func(i *discordgo.InteractionCreate, k string) {
|
||||||
time.Sleep(5 * time.Minute)
|
time.Sleep(5 * time.Minute)
|
||||||
delete(configModifyMap, k)
|
delete(configModifyMap, k)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue