User.listen()

User.listen()[source]

Bound method listen of User.

Use as a shortcut for:

client.listen(user_id=user.id)

Example

user.listen()
Parameters:
  • filters (Optional[hydrogram.Filter]) – Same as hydrogram.Client.listen().

  • listener_type (ListenerTypes) – Same as hydrogram.Client.listen().

  • timeout (Optional[int]) – Same as hydrogram.Client.listen().

  • unallowed_click_alert (bool) – Same as hydrogram.Client.listen().

  • chat_id (Union[int, str], List[Union[int, str]]) – Same as hydrogram.Client.listen().

  • message_id (Union[int, List[int]]) – Same as hydrogram.Client.listen().

  • inline_message_id (Union[str, List[str]]) – Same as hydrogram.Client.listen().

Returns:

Union[Message, CallbackQuery] – The Message or CallbackQuery that fulfilled the listener.