311 questions
0
votes
1
answer
68
views
Pyrogram does not recognize message_entities
I have a problem with forwarding messages with caption_entities. Attached below is the code that I use to make the transfer itself, as well as the result of its operation. The result shows that ...
1
vote
0
answers
70
views
Pyrogram client appears as “Envoy Telegram Desktop/Android” — how can I remove the “Envoy” prefix?
I’m testing a simple Pyrogram client and noticed something strange when the session appears in Telegram’s Active Sessions list.
Here is my test code:
from pyrogram import Client
app = Client(
&...
1
vote
1
answer
106
views
The Pyrogram client does not recognize the id of the channel it created
Below are two scripts. The first one creates a channel, after which it stops working. The second script tries to send a message to this channel, but at the moment of sending, the second script ...
3
votes
1
answer
113
views
Why does importing pyrogram throw an error about there being no current event loop?
When I try tp import pyrogram I get this error:
Traceback (most recent call last):
File "c:\Users\User\Desktop\python\bots\SVG\bott copy.py", line 1, in <module>
from pyrogram ...
0
votes
1
answer
68
views
Media files are not being sent in Pyrogram
Here's my code. When I run it, it only displays "Sending" and that's it. I don't understand what the problem is.The id passed to the function and the path to the photo have been changed for ...
2
votes
1
answer
69
views
Pyrogram bot doesn't send downloaded media
I have a set of functions written in Pyrogram that make up a user bot that copies media messages from one Telegram channel to another. The problem is that it doesn't copy the media messages in the ...
-1
votes
1
answer
123
views
How to reply for messages in telegram? in python
I created a simple python program to automatically reply messages in Group topics, part of it :
bot = Client(name=login, api_id=api_id, api_hash=api_hash, phone_number=phone)
@bot.on_message(filters....
0
votes
0
answers
217
views
pyrogram message.message_thread_id is not working
I have been trying to fetch the thread id from telegram using pyrogram so far I have been successful with fetching the chat ID itself but there are errors when i try to fetch the thread id (I am using ...
0
votes
1
answer
96
views
Pyrogram premium or custom reactions
I need to send premium reactions to messages, but send_reaction() only accepts emojis as a string, how can I specify a premium reaction in send_reaction()?
0
votes
1
answer
93
views
How do I get a phone_number field in enum MessageEntityType in Pyrogram Python?
I want to understand how Pyrogram works. So I tried to get a phone number from the group for educational purposes, similar to what I successfully did with an url.
def main():
with app: ...
0
votes
0
answers
52
views
Using Pyrofork's copy_message method and forward_messages with drop_author=True, are the same?
I am using Pyrofork to send messages and I would like to know the differences between copy_message and forward_messages with parameter drop_author=True.
My main usage is to backup so if the origin ...
0
votes
0
answers
94
views
How to use pyrogram without subscribing to the channel?
I have a telegram bot and a client. The telegram bot is added to all the channels I need (as an administrator). Since bots do not have access to the message history, I receive messages using the ...
0
votes
1
answer
53
views
Three reactions for premium users in pyrogram
I have telegram premium, but I can't put 3 reactions, because when I do it like this, the reactions just change each other, and are not put separately
from pyrogram import Client
z = 5
app = Client(&...
1
vote
1
answer
89
views
Pyrogram: Showing OTP expired even when entered in time
This is the code:
class TelegramWorker(QThread):
otp_sent = pyqtSignal(object)
auth_complete = pyqtSignal(bool, str)
def __init__(self, action, phone_number=None, otp=None, ...
0
votes
0
answers
68
views
"How to use messages.Report with Pyrogram RAW API? Getting 'can't
from pyrogram.raw.functions.messages import Report
from pyrogram.raw.functions.channels import GetChannels
from pyrogram.raw.types import InputPeerChannel, InputReportReasonSpam
from pyrogram.raw ...