parse.py:
from pyrogram import Client
async def user_chat():
app = Client("my_account", api_id=INT, api_hash="STR")
more_users = []
with app:
for member in app.iter_chat_members(INT):
print(member)
id_user = member.user.id
more_users.append(id_user)
username = member.user.first_name
return more_users
main.py:
@dp.message_handler(content_types="new_chat_members")
async def add_chat_bot(message: types.Message):
bot_id = INT
title_chat = str(message.chat.title)
for user in message.new_chat_members:
if user.id == bot_id:
await parse.user_chat()
Ошибка:
for member in app.iter_chat_members(INT):
TypeError: 'async_generator' object is not iterable
Как исправить?
Все данные специально были заменены на типы данных - в коде всё на месте.