feat(top): implements new kind of tops

This commit is contained in:
Anhgelus Morhtuuzh 2025-05-13 16:15:47 +02:00
parent 799df74fcd
commit 01bafe9bf1
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5
7 changed files with 179 additions and 58 deletions

View file

@ -34,8 +34,15 @@ func ResetUser(s *discordgo.Session, i *discordgo.InteractionCreate) {
}
return
}
user.GetCopaing(m.ID, i.GuildID).Reset()
if err := resp.Message("Le user bien été reset.").Send(); err != nil {
err := user.GetCopaing(m.ID, i.GuildID).Delete()
if err != nil {
utils.SendAlert("commands/reset.go - Copaing not deleted", err.Error(), "discord_id", m.ID, "guild_id", i.GuildID)
err = resp.Message("Erreur : impossible de reset l'utilisateur").Send()
if err != nil {
utils.SendAlert("commands/reset.go - Error deleting", err.Error())
}
}
if err = resp.Message("Le user bien été reset.").Send(); err != nil {
utils.SendAlert("commands/reset.go - Sending success (user)", err.Error())
}
}