can't sudo for more than 20 mins

This commit is contained in:
CAG2Mark 2024-04-28 23:23:49 +08:00
parent 576f1c72ea
commit e73c533570

4
bot.py
View File

@ -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