在 python 中反转装饰器的操作

Invert the action of an decorator in python

我正在编写程序,api 应用到电报 python,在版本 2 中,编辑的过滤器已替换为他自己的装饰器,@clinet.on_edited_message, 问题是我想反转是动作,并且只获取未编辑的消息,使用过滤器很容易,在开头添加 ~ ,但我如何在装饰器中做到这一点?谢谢

如版本 2 的发行说明所述,@app.on_edited_message() 仅过滤已编辑的消息。如果您需要 non-edited 条消息,请改用 @app.on_message()