stop_listening()

Client.stop_listening()

Stops all listeners that match the given identifier pattern.

Usable by Users Bots

Uses get_many_listeners_matching_with_identifier_pattern().

Parameters:
  • listener_type (ListenerTypes, optional) – The type of listener to stop listening for. Default to Message.

  • chat_id (int | str | Iterable of int | Iterable of str, optional) – Unique identifier (int) or username (str) of the target chat.

  • user_id (int | str | Iterable of int | Iterable of str, optional) – The user ID to stop listening for.

  • message_id (int, optional) – The message ID to stop listening for.

  • inline_message_id (str, optional) – The inline message ID to stop listening for.