From fe789ad0722924c47243859906497ee2a3a55134 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 16 Apr 2024 15:58:20 +0200 Subject: feat(command): reset and reset-user --- main.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'main.go') 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, } -- cgit v1.2.3