Skip to content

Commit

Permalink
Исправлен баг с разблокировкой
Browse files Browse the repository at this point in the history
Если юзер был в шэдоубане, но не в бане, то конструкция with suppress() завершалась досрочно
  • Loading branch information
MasterGroosha committed Sep 14, 2021
1 parent 28bc1c3 commit edb8dd5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bot/handlers/bans.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ async def cmd_unban(message: types.Message):
user_id = int(user_id)
with suppress(KeyError):
banned.remove(user_id)
with suppress(KeyError):
shadowbanned.remove(user_id)
await message.reply(f"ID {user_id} разблокирован")

Expand Down

0 comments on commit edb8dd5

Please sign in to comment.