Chat.ask()#

Chat.ask()[source]#

Bound method ask of Chat.

Use as a shortcut for:

await client.ask(chat_id=chat_id, text=text)

Example

await chat.ask("What's your name?")
Parameters:
  • text (str) – The text to send.

  • filters (Optional[filters.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().

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

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

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

  • args (Any) – Additional arguments to pass to hydrogram.Client.send_message().

  • kwargs (Any) – Additional keyword arguments to pass to hydrogram.Client.send_message().

Returns:

Union[Message, CallbackQuery] – The Message or CallbackQuery