Skip to content

Commit

Permalink
Merge pull request #83 from kastaid/dev
Browse files Browse the repository at this point in the history
update
  • Loading branch information
illvart authored Mar 24, 2024
2 parents 27068d9 + 9688d7e commit af23bf7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
8 changes: 2 additions & 6 deletions getter/core/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ async def is_admin(
) -> bool:
try:
prm = await message.client.get_permissions(chat_id, user_id)
if prm.is_admin:
return True
return False
return bool(prm.is_admin)
except BaseException:
return False

Expand All @@ -225,9 +223,7 @@ async def admin_check(
return False
if not prm.is_admin:
return False
if require and not getattr(prm, require, False):
return False
return True
return not (require and not getattr(prm, require, False))


def to_privilege(privilege: str) -> str:
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruff==0.3.1
black==24.2.0
ruff==0.3.4
black==24.3.0
isort==5.13.2
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cryptg==0.4.0
psutil==5.9.8
heroku3==5.2.1
GitPython==3.1.42
SQLAlchemy==2.0.28
SQLAlchemy==2.0.29
asyncpg==0.29.0
aiosqlite==0.20.0
sqlalchemy-json==0.7.0
Expand All @@ -15,11 +15,11 @@ aiofiles==23.2.1
aiocsv==1.3.1
aiohttp[speedups]==3.9.3
httpx==0.27.0
Markdown==3.5.2
Markdown==3.6
beautifulsoup4==4.12.3
emoji==2.10.1
Unidecode==1.3.8
validators==0.22.0
validators==0.24.0
telegraph==2.2.0
requests==2.31.0
lottie==0.7.0
Expand Down

0 comments on commit af23bf7

Please sign in to comment.