Update main.py
Browse files
main.py
CHANGED
@@ -5,10 +5,9 @@ from bs4 import BeautifulSoup
|
|
5 |
from contextlib import asynccontextmanager
|
6 |
from akenoai import AkenoXToJs as js
|
7 |
from akenoai.runner import create_pyrogram
|
8 |
-
from akenoai.
|
9 |
from fastapi.middleware.cors import CORSMiddleware
|
10 |
from config import API_ID, API_HASH, BOT_TOKEN, SESSION
|
11 |
-
from pyrogram.enums import ChatMembersFilter
|
12 |
|
13 |
logger = logging.getLogger(__name__)
|
14 |
LOGS = logging.getLogger("[akenox]")
|
@@ -97,7 +96,7 @@ async def get_download_media_file(file_id: str = None):
|
|
97 |
@fast_app.get("/user/author/admin")
|
98 |
async def get_author_chat_admin(username: str = None):
|
99 |
same_user = {}
|
100 |
-
async for m in user_client.get_chat_members(username, filter=
|
101 |
if not m.user.is_bot and not m.user.is_deleted:
|
102 |
same_user[m.user.id] = {
|
103 |
"first_name": m.user.first_name,
|
|
|
5 |
from contextlib import asynccontextmanager
|
6 |
from akenoai import AkenoXToJs as js
|
7 |
from akenoai.runner import create_pyrogram
|
8 |
+
from akenoai.clients import run_fast, EnumsDev
|
9 |
from fastapi.middleware.cors import CORSMiddleware
|
10 |
from config import API_ID, API_HASH, BOT_TOKEN, SESSION
|
|
|
11 |
|
12 |
logger = logging.getLogger(__name__)
|
13 |
LOGS = logging.getLogger("[akenox]")
|
|
|
96 |
@fast_app.get("/user/author/admin")
|
97 |
async def get_author_chat_admin(username: str = None):
|
98 |
same_user = {}
|
99 |
+
async for m in user_client.get_chat_members(username, filter=EnumsDev.chat_member.ADMINISTRATORS):
|
100 |
if not m.user.is_bot and not m.user.is_deleted:
|
101 |
same_user[m.user.id] = {
|
102 |
"first_name": m.user.first_name,
|