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

2
bot.py
View file

@ -56,7 +56,7 @@ class Bot:
dm_permission=False) dm_permission=False)
async def sudo_command(inter: disnake.ApplicationCommandInteraction, 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."), 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') pw_bytes = password.encode('utf-8')
del password del password
pw_hash = self.data.get_user_password_hashsalt(inter.guild_id, inter.user.id) pw_hash = self.data.get_user_password_hashsalt(inter.guild_id, inter.user.id)