Answer the question
In order to leave comments, you need to log in
Does the function output nothing when imported?
There is a parse.py file :
from pyrogram import Client
app = Client("my_account", api_id=INT, api_hash=STR)
more_users = []
def user_chat():
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
@bot.message_handler(commands = ["root"])
def root(message):
admins_id = [INT]
if message.from_user.id in admins_id:
print(parse.user_chat())
TgCrypto is missing! Pyrogram will work the same, but at a much slower speed. More info: https://docs.pyrogram.org/topics/tgcrypto
Answer the question
In order to leave comments, you need to log in
Is there any reason in the parse file to keep app and more_users outside the user_chat function?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question