User.ask()

User.ask()[source]

Bound method ask of User.

Use as a shortcut for:

client.ask(user_id=user.id)

Example

user.ask("Hello!")
Parameters:
  • text (str) – Same as hydrogram.Client.ask().

  • filters (Optional[hydrogram.Filter]) – Same as hydrogram.Client.ask().

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

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

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

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

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

  • args (Any) – Same as hydrogram.Client.ask().

  • kwargs (Any) – Same as hydrogram.Client.ask().

Returns:

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