OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Python telegram bot with pyrogram stopped receiving messages from some channels

  • Thread starter Thread starter Kudzai Madziva
  • Start date Start date
K

Kudzai Madziva

Guest
My telegram bot built using python and pyrogram was working properly i.e. receiving all the messages from all telegram subscribed channels. It started having the following problems:

  1. Not receiving messages from telegram channels
  2. Not receiving all the messages received on the telegram channels

Code:
from pyrogram import Client, filters

TELEGRAM_API_ID = xxxxx
TELEGRAM_API_HASH = "xxxxx"
TELEGRAM_BOT_TOKEN = "xxxxx" 
TELEGRAM_BOT_NAME="xxxxx"
bot = Client(TELEGRAM_BOT_NAME, api_id=TELEGRAM_API_ID, api_hash=TELEGRAM_API_HASH)

bot.on_message(filters.channel)
async def telegram_bot_main(client, message):
   print(message.text)
bot.run()

I expect to :

  1. To receive all the messages from all subscribed channels
<p>My telegram bot built using python and pyrogram was working properly i.e. receiving all the messages from all telegram subscribed channels. It started having the following problems:</p>
<ol>
<li>Not receiving messages from telegram channels</li>
<li>Not receiving all the messages received on the telegram channels</li>
</ol>
<pre><code>from pyrogram import Client, filters

TELEGRAM_API_ID = xxxxx
TELEGRAM_API_HASH = "xxxxx"
TELEGRAM_BOT_TOKEN = "xxxxx"
TELEGRAM_BOT_NAME="xxxxx"
bot = Client(TELEGRAM_BOT_NAME, api_id=TELEGRAM_API_ID, api_hash=TELEGRAM_API_HASH)

bot.on_message(filters.channel)
async def telegram_bot_main(client, message):
print(message.text)
bot.run()
</code></pre>
<p>I expect to :</p>
<ol>
<li>To receive all the messages from all subscribed channels</li>
</ol>
 

Latest posts

H
Replies
0
Views
1
Hür Doğan ÜNLÜ
H
Top