Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async def process():
- x = await client.send_message('AnonRuBot', '/start')
- await asyncio.sleep(2)
- result = await client.get_messages(entity='@AnonRuBot', ids=x.id + 1)
- if hasattr(result, "message") and 'Если не хотите' in result.message:
- s = await client.send_message('AnonRuBot', f'{random.randint(9, 99)}')
- await asyncio.sleep(2)
- res = await client.get_messages(entity='@AnonRuBot', ids=s.id + 2)
- if hasattr(result, "message") and 'Собеседник найден' in res.message:
- while True:
- await asyncio.sleep(3)
- await client.send_message('AnonRuBot', text)
- await asyncio.sleep(2)
- await client.send_message('AnonRuBot', '/next')
- else:
- while True:
- await asyncio.sleep(2)
- await client.send_message('AnonRuBot', '/next')
- await client.send_message('AnonRuBot', text)
- else:
- while True:
- await asyncio.sleep(3)
- await client.send_message('AnonRuBot', text)
- await asyncio.sleep(2)
- await client.send_message('AnonRuBot', '/next')
- with client:
- client.loop.run_until_complete(process())
- async def processtwo():
- x = await client2.send_message('AnonRuBot', '/start')
- await asyncio.sleep(2)
- result = await client2.get_messages(entity='@AnonRuBot', ids=x.id + 1)
- if hasattr(result, "message") and 'Если не хотите' in result.message:
- s = await client2.send_message('AnonRuBot', f'{random.randint(9, 99)}')
- await asyncio.sleep(2)
- res = await client2.get_messages(entity='@AnonRuBot', ids=s.id + 2)
- if hasattr(result, "message") and 'Собеседник найден' in res.message:
- while True:
- await asyncio.sleep(3)
- await client2.send_message('AnonRuBot', text)
- await asyncio.sleep(2)
- await client2.send_message('AnonRuBot', '/next')
- else:
- while True:
- await asyncio.sleep(2)
- await client2.send_message('AnonRuBot', '/next')
- await client2.send_message('AnonRuBot', text)
- else:
- while True:
- await asyncio.sleep(3)
- await client2.send_message('AnonRuBot', text)
- await asyncio.sleep(2)
- await client2.send_message('AnonRuBot', '/next')
- with client2:
- client2.loop.run_until_complete(processtwo())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement