Skip to content

Commit

Permalink
auto: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Safone authored and AsmSafone committed Jan 19, 2022
1 parent f5e1a6c commit ed21c0e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions core/admins.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,20 @@


async def is_sudo(message):
if (
message.from_user and message.from_user.id in config.SUDOERS
):
if message.from_user and message.from_user.id in config.SUDOERS:
return True
else:
return False


async def is_admin(message):
if message.from_user and (
message.from_user.id
in [
admin.user.id
for admin in (await message.chat.get_members(filter="administrators"))
]
):
message.from_user.id
in [
admin.user.id
for admin in (await message.chat.get_members(filter="administrators"))
]
):
return True
elif message.from_user and message.from_user.id in config.SUDOERS:
return True
Expand Down

0 comments on commit ed21c0e

Please sign in to comment.