mirror of
https://github.com/CAG2Mark/SuperUserBot.git
synced 2025-02-05 01:35:16 +01:00
restrict password length
This commit is contained in:
parent
0bcb1452d5
commit
97d0c05058
1 changed files with 1 additions and 1 deletions
2
bot.py
2
bot.py
|
@ -92,7 +92,7 @@ class Bot:
|
||||||
description='Set your password on this guild. DO NOT use the same password elsewhere.',
|
description='Set your password on this guild. DO NOT use the same password elsewhere.',
|
||||||
dm_permission=False)
|
dm_permission=False)
|
||||||
async def set_password_command(inter: disnake.ApplicationCommandInteraction,
|
async def set_password_command(inter: disnake.ApplicationCommandInteraction,
|
||||||
password: str = commands.Param(default="", name="password", description="The password to set.")):
|
password: str = commands.Param(default="", name="password", description="The password to set.", min_length=6, max_length=51)):
|
||||||
pw = self.data.get_user_password_hashsalt(inter.guild_id, inter.user.id)
|
pw = self.data.get_user_password_hashsalt(inter.guild_id, inter.user.id)
|
||||||
sudo_role = self.data.get_guild_role(inter.guild_id)
|
sudo_role = self.data.get_guild_role(inter.guild_id)
|
||||||
has_sudo_role = any([r.id == sudo_role for r in inter.user.roles])
|
has_sudo_role = any([r.id == sudo_role for r in inter.user.roles])
|
||||||
|
|
Loading…
Reference in a new issue