Answer the question
In order to leave comments, you need to log in
How to call multiple pyrogram decarators in Python?
Hello.
I am implementing a task for telegram. Now we need to make sure that all the decorators that are in the code are called. In the current implementation, only the first one works. And it is necessary that all decorators suitable for the conditions work.
For example, here is the code:
api_id = 1219
api_hash = "8a57f29f598197d9efe9+3"
app = Client("D:/my_account", api_id, api_hash)
@app.on_message(filters.text & filters.outgoing)
def callback(client: app, message: Message):
if 'smile' in message.text:
msg = message.text.replace('smile', 'CENSORED')
message.edit_text(msg)
@app.on_message(filters.text & filters.outgoing)
def callback(client: app, message: Message):
for k in range(11):
message.edit_text(str(k))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question