Use common filters in pywa
masterThe pywa.filters module provides a variety of filters used to intercept and process specific types of incoming updates or messages. These filters allow you to define precise criteria for your handlers, such as filtering by message type, button interaction, call status, or account updates.
Available filter categories include:
- Message & Interaction:
message,callback_button,callback_selection,message_status,flow_completion. - Call Events:
call_connect,call_terminate,call_status,call_permission_update. - Account & Identity:
phone_number_change,identity_change,account_update,user_marketing_preferences. - Template Metadata:
template_status,template_category,template_quality,template_components. - Contextual Filters:
private(for private chats),group(for group chats),sent_to_me,sent_to. - User/Identity Filters:
from_users,without_wa_id,from_countries,waba_id. - String/Pattern Matching:
matches,contains,startswith,endswith,regex.