title: How to send a message through Pyrogram?
body: <pre><code>from pyrogram import Client
  from pyrogram.errors import PeerFlood
  import time
  
  vubor = input('Нажмите Enter чтобы запустить рассылку! ')
  api_id = 12905662
  api_hash = &quot;a7cfcd44cb95d26d7529d547c9a1d9ef&quot;
  app = Client('my_accont11', api_id, api_hash)
  
  if vubor == '':
      def rassulka(app):
          try:
              with open('username.txt', 'r') as file:
                  for users in file.readlines():
                      y = users.strip()
                      time.sleep(5)
                      app.send_message(y, 'q')
                      file.replace(y, '')
  
          except PeerFlood:
              print('Аккаунт заблокировн')
  
  
      with app:
          rassulka(app)
  </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>
  <p>I do not know what to do</p>