title: How to remove the error 400 PEER_ID_INVALID?
body: <pre><code>import asyncio
  
  from pyrogram import Client
  from pyrogram.errors import PeerFlood
  import time
  
  api_id = 12905662
  api_hash = &quot;a7cfcd44cb95d26d7529d547c9a1d9ef&quot;
  
  vubor = input('Напишите &quot;1&quot; для парсинга, &quot;2&quot; для рассылки! ')
  text = input('Текст для рассылки: ')
  
  account = ['my_accont1', 'my_accont2', 'my_accont3', 'my_accont4', 'my_accont5', 'my_accont6', 'my_accont7',
             'my_accont8', 'my_accont9']
  
  
  async def main():
      if vubor == '1':
          user = []
          with open('username.txt', 'r') as file:
              for users in file.readlines():
                  y = users.strip()
                  user.append(y)
              for acc in account:
                  try:
                      async with Client(f&quot;{acc}&quot;, api_id, api_hash) as app:
                          for all_user in user[0:500]:
                              time.sleep(5)
                              await app.send_message(all_user, text)
                              user.remove(all_user)
                  except PeerFlood:
                      print('Аккаунт заблокировн')
  
  
  
  
  asyncio.run(main())
  </code></pre>
  <p>pyrogram.errors.exceptions.bad_request_400.PeerIdInvalid: Telegram says: [400 PEER_ID_INVALID] - The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it</p>