Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async def get_join_requests(chat_id):
- date = 0
- user = types.InputUserEmpty()
- while True:
- r = await client(
- functions.messages.GetChatInviteImportersRequest(
- peer=chat_id,
- limit=100,
- offset_date=date,
- offset_user=user,
- requested=True,
- )
- )
- if not r.importers:
- break
- date, user = r.importers[-1].date, r.importers[-1].user_id
- for i in r.importers:
- # do action to i.user_id or yield them somewhere else
- # sleep a bit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement