'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 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ColinShark |
