SHARE
TWEET

Untitled

a guest Nov 19th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async def client_test():
  2.     clients = []
  3.     for session in get_sessions():
  4.         client = TelegramClient(str(session), api_id, api_hash)
  5.         await client.connect()
  6.         print(session)
  7.         clients.append(client)
  8.     return clients
  9.  
  10. async def send_message_test():
  11.     clients = await client_test()
  12.     for client in clients:
  13.         message = await client.send_message('autobuy_bot', 'hello')
  14.         print('send_message', message)
  15.  
  16. async def main():
  17.         await send_message_test()
  18.  
  19. if __name__ == '__main__':
  20.     asyncio.run(main())
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top