Update main.py
Browse files
main.py
CHANGED
@@ -79,11 +79,13 @@ async def get_user_story(link: str = None):
|
|
79 |
|
80 |
|
81 |
@fast_app.get("/user/author/admin")
|
82 |
-
async def
|
83 |
same_user = {}
|
84 |
async for m in user_client.get_chat_members(username, filter=ChatMembersFilter.ADMINISTRATORS):
|
85 |
if not m.user.is_bot and not m.user.is_deleted:
|
86 |
-
same_user[m.user.id] =
|
|
|
|
|
87 |
return {
|
88 |
"admin_list": same_user
|
89 |
}
|
|
|
79 |
|
80 |
|
81 |
@fast_app.get("/user/author/admin")
|
82 |
+
async def get_author_chat_admin(username: str = None):
|
83 |
same_user = {}
|
84 |
async for m in user_client.get_chat_members(username, filter=ChatMembersFilter.ADMINISTRATORS):
|
85 |
if not m.user.is_bot and not m.user.is_deleted:
|
86 |
+
same_user[m.user.id] = {
|
87 |
+
"first_name": m.user.first_name,
|
88 |
+
"username": m.user.username if m.user else None
|
89 |
return {
|
90 |
"admin_list": same_user
|
91 |
}
|