fix(command): using wrong key for /rank due to previous automatic refactor

This commit is contained in:
Anhgelus Morhtuuzh 2025-05-13 18:24:27 +02:00
parent f2fbf1db92
commit a02a0d8e3e
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5
2 changed files with 4 additions and 10 deletions

12
main.go
View file

@ -43,11 +43,11 @@ func main() {
adm := gokord.AdminPermission
rankCmd := gokord.NewCommand("rank", "Affiche le niveau d'un user").
rankCmd := gokord.NewCommand("rank", "Affiche le niveau d'un copaing").
HasOption().
AddOption(gokord.NewOption(
discordgo.ApplicationCommandOptionUser,
"user",
"copaing",
"Le niveau du Copaing que vous souhaitez obtenir",
)).
SetHandler(commands.Rank)
@ -185,13 +185,7 @@ func afterInit(dg *discordgo.Session) {
dg.AddHandler(OnVoiceUpdate)
dg.AddHandler(OnLeave)
// setup timer for periodic reducer
d := 24 * time.Hour
if gokord.Debug {
// reduce time for debug
d = time.Minute
}
stopPeriodicReducer = utils.NewTimer(d, func(stop chan<- interface{}) {
stopPeriodicReducer = utils.NewTimer(24*time.Hour, func(stop chan<- interface{}) {
user.PeriodicReducer(dg)
})
}