feat(command): reset and reset-user

This commit is contained in:
Anhgelus Morhtuuzh 2024-04-16 15:58:20 +02:00
parent 6b595b8b11
commit fe789ad072
No known key found for this signature in database
GPG key ID: CF4550297832A29F
3 changed files with 56 additions and 0 deletions

17
main.go
View file

@ -100,6 +100,21 @@ func main() {
HasOption().
SetHandler(commands.Top)
resetCmd := gokord.NewCommand("reset", "Reset l'xp").
HasOption().
SetHandler(commands.Reset).
SetPermission(gokord.AdminPermission)
resetUserCmd := gokord.NewCommand("reset-user", "Reset l'xp d'un utilisation").
HasOption().
AddOption(gokord.NewOption(
discordgo.ApplicationCommandOptionUser,
"copaing",
"Copaing a reset",
).IsRequired()).
SetHandler(commands.ResetUser).
SetPermission(gokord.AdminPermission)
bot := gokord.Bot{
Token: token,
Status: []*gokord.Status{
@ -113,6 +128,8 @@ func main() {
rankCmd,
configCmd,
topCmd,
resetCmd,
resetUserCmd,
},
AfterInit: afterInit,
}