Questions tagged [pyrogram]

Pyrogram is a Telegram framework, used for custom apps for both user and bot identities. It uses the MTProto API

Pyrogram is a modern, elegant and easy-to-use Telegram framework written from the ground up in Python and C. It enables you to easily create custom apps for both user and bot identities (bot API alternative) via the MTProto API.

Homepage: https://docs.pyrogram.org/

278 questions
0
votes
0 answers

Returns errors when passing a phone number in authorization

Returns errors when passing a phone number in authorization in pyrogram,I don't know what the problem is, please help Traceback (most recent call last): File "/Users/nikitamakarov/PycharmProjects/pythonProject12/main.py", line 10, in
steilzz.
  • 1
  • 1
0
votes
1 answer

pyrogram - PingTask is frozen

async def send_message(chat_id: int): image_files = get_image_files() if not image_files: try: await app.send_message(chat_id, "1") logger.info(f"Бот успешно отправил сообщение в чат: {chat_id}") …
frexget
  • 1
  • 1
0
votes
1 answer

How to run multiple clients (my_account, my_bot) at the same time on pyrogram

I'm having trouble with running both 'my_account' and 'my_bot' at the same time. I need to do some tasks with Client('my_account') class and automatic reply to commands with Client('my_bot') class. I've tried so many ways, but no results. Here is my…
0
votes
0 answers

Pyrogram send_message method intermittently slow

I am using the method send_message from Pyrogram to send messages to our users on Telegram. Sometimes it takes a while to finish its execution (up to 15 seconds) and some other times it works really fast (less than 1 second). Is it a characteristic…
Rhenan Bartels
  • 391
  • 2
  • 6
  • 14
0
votes
0 answers

How to get replies to messages

I am using pyrogram, I need to retrieve responses from a message, knowing that it has been replied to I tried MessageReplies and messages.GetReplies but nothing worked @user1.on_message(filters.group) async def replies(client, message): try: …
0
votes
0 answers

How to fix ' no process is listening to the 443 port using http' while deploying a pyrogram bot to back4app?

I am constantly getting it looks that no process is listening to the 443 port using http untill the deployment fails. In the meantime, the bot seems to be working perfectly on telegram. I have been trying to host my pyrogram-telegram bot to…
Lúcifer
  • 96
  • 1
  • 4
0
votes
0 answers

why the keyboard in the bot are not working?

The bot sends me a screenshot message with promo code activation, and 4 buttons are created under the message, namely 1-4, and each button executes its own script in Chromium, but for some reason the buttons are not working from…
0
votes
2 answers

pyrogram: download multiple files at the same time

I'm setting workers count to 4 (in Pyrogram client) to download multiple files at the same time, It is creating all the temporary files at first, but downloading one file at a time. I'm downloading profile photos actually. Github…
EBRAHIM
  • 17
  • 5
0
votes
0 answers

How to check telegram channels for comments?

I need to use pyrogram module to check the telegram channel for comments, I think the GetGroupsForDiscussion method should do it, but it doesn't want to accept arguments. And it's nonsense to make code that checks for an error when receiving the…
0
votes
1 answer

pyrogram: get updates that happened during offline time

Assume that pyrogram client is started and receiving updates (new events) and saving them in a databse. if I stop the client, wait for one minute, and start the client again, it doesn't receive updates that occurred during the offline time. by…
EBRAHIM
  • 17
  • 5
0
votes
0 answers

How to run Pyrogram Client if type of Telegram api_id is "str"?

I faced an issue in Pyrogram: if Telegram api_id type is str an error occurs: ".../pyrogram/client.py", line 233, in init self.api_id = int(api_id) if api_id else None ValueError: invalid literal for int() with base 10: '123xxx' Although the…
0
votes
0 answers

why does pyrogram sign_in() causes asyncio error?

first, I am creating Client object and connecting it active_sessions[alice_user_id] = {'client': Client(alice_user_id, API_ID, API_HASH, workdir='sessions_tg')} await active_sessions[alice_user_id]['client'].connect() after it, I am sending…
0
votes
1 answer

How in the Program send message to Forum Topic

I wanted to send a message to Forum Topic: from pyrogram import Client, filters from pyrogram.raw import functions,types app = Client("my_account", api_id="12345678", api_hash="g8u4h894urgh09eurhiugfdgfrgrg") async def get_chat_themes(client): …
Hack337
  • 3
  • 1
0
votes
0 answers

Encountering "400 PEER_ID_INVALID" error in Pyrogram's import_contacts method

I am developing an unofficial Telegram program using the Pyrogram library in a shell environment. After a user connects their account to my program, they can provide a list of phone numbers and messages to the program, and the program will send…
B. Azizan
  • 93
  • 1
  • 4
  • 12
0
votes
0 answers

Pyrogram accs gots banned after .start()

async def convert(sessionId, isShadow=None, userId=None): if userId: try: if conn.cursor().execute(f'SELECT * FROM users WHERE userId == {userId}').fetchone()[0]: path = f'users\\{userId}\\sessions\\' …