倒在Python中的装饰器的动作

发布于 2025-01-24 21:00:00 字数 183 浏览 3 评论 0原文

我正在开发程序,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木緿 2025-01-31 21:00:01

正如版本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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文