Skip to content

Commit edb8dd5

Browse files
committed
Исправлен баг с разблокировкой
Если юзер был в шэдоубане, но не в бане, то конструкция with suppress() завершалась досрочно
1 parent 28bc1c3 commit edb8dd5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bot/handlers/bans.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ async def cmd_unban(message: types.Message):
3939
user_id = int(user_id)
4040
with suppress(KeyError):
4141
banned.remove(user_id)
42+
with suppress(KeyError):
4243
shadowbanned.remove(user_id)
4344
await message.reply(f"ID {user_id} разблокирован")
4445

0 commit comments

Comments
 (0)