mirror of
https://github.com/CAG2Mark/SuperUserBot.git
synced 2024-11-14 06:23:48 +01:00
fix bug
This commit is contained in:
parent
3eb94ae50b
commit
0bcb1452d5
4
bot.py
4
bot.py
@ -60,7 +60,9 @@ class Bot:
|
|||||||
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)
|
||||||
pw_hash_bytes = bytes.fromhex(self.data.get_user_password_hashsalt(inter.guild_id, inter.user.id))
|
|
||||||
|
if pw_hash:
|
||||||
|
pw_hash_bytes = bytes.fromhex(self.data.get_user_password_hashsalt(inter.guild_id, inter.user.id))
|
||||||
|
|
||||||
if not pw_hash or bcrypt.checkpw(pw_bytes, pw_hash_bytes):
|
if not pw_hash or bcrypt.checkpw(pw_bytes, pw_hash_bytes):
|
||||||
sudoer_role = self.data.get_guild_sudoer_role(inter.guild_id)
|
sudoer_role = self.data.get_guild_sudoer_role(inter.guild_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user