aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-04-16 15:58:20 +0200
committerAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-04-16 15:58:20 +0200
commitfe789ad0722924c47243859906497ee2a3a55134 (patch)
treeaac8b09a03b43d0cc75622d9dd0747c74dbeaea4 /main.go
parent6b595b8b11e9ac05302ee15ab7734e49b89594e5 (diff)
feat(command): reset and reset-user
Diffstat (limited to 'main.go')
-rw-r--r--main.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/main.go b/main.go
index d8cdbc2..e23d0ea 100644
--- a/main.go
+++ b/main.go
@@ -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,
}