pyrobale.filters

Attributes

Functions

equals(expected_text)

Check if the event text or caption or callbackQuery data is equal to the expected text.

startswith(expected_text)

Check if the event text or caption or callbackQuery data is started with to the expected text.

regex(pattern)

checks the event text or caption with given pattern using regex

from_users(allowed_users)

Check if the event text or caption or callbackQuery sender is in allowed user.

is_joined(chat_ids)

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

pyrobale.filters.is_joined(chat_ids)[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.

  • chat_ids (Union[List[Union[pyrobale.objects.user.User, int, str]], int, str])

Returns:

A function that checks if the event text or caption or callbackQuery sender is in allowed user.

Return type:

Callable

pyrobale.filters.channel[source]
pyrobale.filters.group[source]
pyrobale.filters.digit[source]