pyrobale.filters¶
Attributes¶
Functions¶
|
Check if the event text or caption or callbackQuery data is equal to the expected text. |
|
Check if the event text or caption or callbackQuery data is started with to the expected text. |
|
checks the event text or caption with given pattern using regex |
|
Check if the event text or caption or callbackQuery sender is in allowed user. |
Package Contents¶
- pyrobale.filters.equals(expected_text)[source]¶
Check if the event text or caption or callbackQuery data is equal to the expected text.
- Parameters:
expected_text (str) – The expected text to compare with.
- Returns:
A function that checks if the event text or caption or callbackQuery data is equal to the expected text.
- Return type:
Callable
- pyrobale.filters.startswith(expected_text)[source]¶
Check if the event text or caption or callbackQuery data is started with to the expected text.
- Parameters:
expected_text (str) – The expected text to compare with.
- Returns:
A function that checks if the event text or caption or callbackQuery data is started with to the expected text.
- Return type:
Callable
- pyrobale.filters.regex(pattern)[source]¶
checks the event text or caption with given pattern using regex
- Parameters:
pattern (str) – The pattern to check with text
- Returns:
A function that checks if the event text or caption is match with given pattern
- Return type:
Callable
- pyrobale.filters.from_users(allowed_users)[source]¶
Check if the event text or caption or callbackQuery sender is in allowed user.
- Parameters:
allowed_users (List[Union["User", int]]) – Allowed users to use this handler.
- Returns:
A function that checks if the event text or caption or callbackQuery sender is in allowed user.
- Return type:
Callable