New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update for the new and left chat member filters #741
base: master
Are you sure you want to change the base?
Conversation
Filters for new and left chat member that supports the new update type
This update suports the new ChetMemberUpdate updare. The threshold parameter check if a user has joined in the last 2 seconds related to the update creation time. The check "if is_member is False" is importent because this variabel can be None
pyrogram/filters.py
Outdated
| if isinstance(m, Message): | ||
| return bool(m.new_chat_members) | ||
| if m.new_chat_member: | ||
| threshold = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best threshold is 2sec or 3sec
|
I believe we need separate filters (with new names) that don't mess with the existing ones (which are dedicated to Message objects because they are about events that generate the service message, whereas ChatMemberUpdated events are silent). |
Want me to upload it as a separate file with filters for ChatMemberUpdated or in the same file? |
Fixed the new filters and add some new filters.
@delivrance I would appreciate it if you could check out the new update |

This update suports the new ChetMemberUpdate updare.