Chat.ask()

async Chat.ask()[source]

Bound method ask of Chat.

Use as a shortcut for:

await client.ask(chat.id, "What is your name?")

Example

await chat.ask("What is your name?")
Returns:

Message | CallbackQuery – The answer, with the prompt attached as sent_message.

Raises:

ListenerTimeout – In case nobody answered in time.