Commit b35dcbd8 authored by Roman Alifanov's avatar Roman Alifanov

small fix

parent aa9b80c3
...@@ -425,7 +425,7 @@ async def report_spam(message: types.Message): ...@@ -425,7 +425,7 @@ async def report_spam(message: types.Message):
# Фильтруем только тех, у кого роль "Модератор" # Фильтруем только тех, у кого роль "Модератор"
moderators = [ moderators = [
f"@{admin.user.username}" for admin in chat_admins f"@{admin.user.username}" for admin in chat_admins
if admin.user.username and not admin.user.is_bot and admin.custom_title and "модератор" in admin.custom_title.lower() if not admin.user.is_bot and (admin.status == 'creator' or (admin.can_restrict_members and admin.can_delete_messages))
] ]
if not moderators: if not moderators:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment