Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Invert the action of an decorator in python

I’m working on Program, api application to python of telegram, in version 2, filter edited has replaced with a decorator of his own, @clinet.on_edited_message,
the problem is that I want to invert is action, and get only not edited messages, with filter is easy, add ~ in the beginning, but how do I do that in a decorator? thanks

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

As the Release Notes for Version 2 describe, @app.on_edited_message() only filters edited messages. If you want non-edited messages, use @app.on_message() instead.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading