Skip to main content
Version: Latest

Filters

Filters in RimTUB work exactly the same as in the original Kurigram. Kurigram documentation is available here. No additional actions are required, unlike custom handlers.

Additional Filters


account_filter

Filters messages by the current client's ID.

Arguments:

  • id (int) — Client ID (e.g., client.me.id).

Returns: Filter — A filter that allows only messages from the specified client.


text_filter

Filters by exact text match of the message.

Arguments:

  • text (str | List[str]) — Expected text or a list of texts.

Returns: Filter — A filter that checks if the message text matches the specified text.


thread_filter

Filters messages by thread ID (message thread ID).

Arguments:

  • message_thread_id (int) — Thread ID (Message.message_thread_id).

Returns: Filter — A filter that allows only messages from the specified thread.