mirror of
https://github.com/CAG2Mark/SuperUserBot.git
synced 2024-12-25 14:36:06 +01:00
can't sudo for more than 20 mins
This commit is contained in:
parent
576f1c72ea
commit
e73c533570
1 changed files with 2 additions and 2 deletions
4
bot.py
4
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue