fix(command): reset-user not working and can reset bot

This commit is contained in:
Anhgelus Morhtuuzh 2024-04-16 16:10:08 +02:00
parent ac73839583
commit 6c2436093b
No known key found for this signature in database
GPG key ID: CF4550297832A29F
2 changed files with 8 additions and 2 deletions

View file

@ -28,8 +28,14 @@ func ResetUser(s *discordgo.Session, i *discordgo.InteractionCreate) {
return
}
m := v.UserValue(s)
if m.Bot {
if err := resp.Message("Les bots n'ont pas de niveau :upside_down:").Send(); err != nil {
utils.SendAlert("commands/reset.go - Copaing not set", err.Error())
}
return
}
xp.GetCopaing(m.ID, i.GuildID).Reset()
if err := resp.Message("Le a bien été reset.").Send(); err != nil {
if err := resp.Message("Le copaing bien été reset.").Send(); err != nil {
utils.SendAlert("commands/reset.go - Sending success (copaing)", err.Error())
}
}