fix(command): reset-user not working and can reset bot
This commit is contained in:
parent
ac73839583
commit
6c2436093b
2 changed files with 8 additions and 2 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue