pyrogram

I need a forward function code which forward the original message (pyrogram)

I need a forward function code which forward the original message (pyrogram) Question: @bot.on_message(filters.chat(INPUT_CHANNELS) & filters.text) def forward_message(client, message: Message): text = message.text client.send_message(chat_id=DESTINATION_CHANNEL, text=text) I got this code here, but it just forwards text from the message although there is an image. I need it to forward the original message, keeping all the content …

Total answers: 1

Transfer Telegram channel ownership using pyrogram library

Transfer Telegram channel ownership using pyrogram library Question: How to transfer channel ownership? I want to transfer ownership of a Telegram channel using pyrogram. There is a promote_chat_member method but it does not have an owner input parameter. There is also a pyrogram.raw.functions.channels.EditCreator method but I don’t understand how to use it. Asked By: Kuchizu …

Total answers: 3

Does pyrogram support Finite State Machine or FSM for short

Does pyrogram support Finite State Machine or FSM for short Question: Good time of a day to you all! Short Question: Does pyrogram support FSM how it’s implemented in AIOGram? Long Question: I’m just searching for a telegram API wrapper other than AIOgram and PyTelegramBotApi and found this. I read documentation intro for Pyrogram and …

Total answers: 1

Pyrogram, How to send /start with params

Pyrogram, How to send /start with params Question: I have url https://t.me/Bot_name?start=mc_dSs8EMrECY1Jvwk How can I follow this link using Program. Or how to send a telegram message to the bot /start with param mc_dSs8EMrECY1Jvwk I tried using client.join_chat(url) the telegram server gives an invalid username error. also try create inlinebutton with url and clicked on …

Total answers: 1

How to upgrade pyrogram to the latest version in linux

How to upgrade pyrogram to the latest version in linux Question: I can’t to upgrade pyrogram to latest version in Linux. I’m using pip3 install –upgrade pyrogram and it looks like my program is not seeing a newer version of pyrogram. But using the same command in Windows I was able to upgrade pyrogram to …

Total answers: 1

Telethon find .session file phone number

Telethon find .session file phone number Question: I have already authorized .session file I forgot his number, tried adding other account to contact, tried changing privacy so I can see from other accs, all with no success.. any suggestions ? Asked By: Bali Cali || Source Answers: Log in to the Telethon .session file normally …

Total answers: 1

Send premium-emoji with Pyrogram

Send premium-emoji with Pyrogram Question: I need to send a premium emoji on the user’s account using Pyrogram. I tried to send with send_message() a list of MessageEntityCustomEmoji and MessageEntity. The first one gave the error ‘MessageEntityCustomEmoji’ object has no attribute ‘_client’, and the second one sent a message without an emoji. How do I …

Total answers: 1

Pyrogram : How to get the latest message id?

Pyrogram : How to get the latest message id? Question: I’m currently trying to create something that needs to get the number of messages in a group/channel. The best way imo is to get the id of the latest message in this chat As my bot will handle deleted messages, we don’t care about them …

Total answers: 3

How to register a pyrogram account

How to register a pyrogram account Question: I’m trying to signup on telegram using pyrogram library Here’s the code I used sc = app.send_code(phone_number = phone) app.sign_up( phone_number = phone, phone_code_hash = code, first_name = first_name, last_name = last_name ) I get below error pyrogram.errors.exceptions.bad_request_400.PhoneCodeExpired: [400 PHONE_CODE_EXPIRED] Asked By: JayL || Source Answers: Firstly, you …

Total answers: 2

Is there a way to disable Pyrogram logging?

Is there a way to disable Pyrogram logging? Question: I’m using this library only for couple methods, and it’s kinda annoying that it’s printing a lot of logs beside my own initialization logs. Tried to get same logger as library gets, "pyrogram.client", and change it’s level – nothing changed. Also logger.propagate = false doesn’t help. …

Total answers: 2