From e73c533570bc326e0b1100de9b47d8a3ece15831 Mon Sep 17 00:00:00 2001 From: CAG2Mark Date: Sun, 28 Apr 2024 23:23:49 +0800 Subject: [PATCH] can't sudo for more than 20 mins --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 95b9424..65cc2a0 100644 --- a/bot.py +++ b/bot.py @@ -56,7 +56,7 @@ class Bot: dm_permission=False) async def sudo_command(inter: disnake.ApplicationCommandInteraction, password: str = commands.Param(default="", name="password", description="Your password. Leave empty if you do not have a password on this guild yet."), - duration: int = commands.Param(default=5, name="duration", description="The time you receive the administrator role for in minutes.", gt=1)): + duration: int = commands.Param(default=5, name="duration", description="The time you receive the administrator role for in minutes.", gt=1, lt=20)): pw_bytes = password.encode('utf-8') del password pw_hash = self.data.get_user_password_hashsalt(inter.guild_id, inter.user.id) @@ -139,7 +139,7 @@ class Bot: user = guild.get_member(user) if not user: continue - + role = user.get_role(role) if not role: continue