倒在Python中的装饰器的动作
我正在开发程序,API申请到Telegram的Python,在版本2中,Filter编辑已替换为自己的装饰器,@clinet.on_edited_message_message
, 问题是我想倒转是动作,并且只能获得不编辑的消息,使用过滤器很容易,在开始时添加〜
,但是我如何在装饰器中执行此操作?谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如版本2的发行说明所述,
@app.on_edited_message()
仅过滤邮件。如果需要非编辑消息,请改用@app.on_message()
。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.