Chat.stop_listening()#

Chat.stop_listening()[source]#

Bound method stop_listening of Chat.

Use as a shortcut for:

await client.stop_listening(chat_id=chat_id)

Example

await chat.stop_listening()
Parameters:
  • listener_type (ListenerTypes) – The type of listener to stop listening for. Defaults to hydrogram.types.ListenerTypes.MESSAGE.

  • user_id (Optional[Union[int, str], List[Union[int, str]]]) – The user ID(s) to stop listening for. Defaults to None.

  • message_id (Optional[Union[int, List[int]]]) – The message ID(s) to stop listening for. Defaults to None.

  • inline_message_id (Optional[Union[str, List[str]]]) – The inline message ID(s) to stop listening for. Defaults to None.

Returns:

bool – The return value of hydrogram.Client.stop_listening().