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 ashydrogram.Client.listen()
.listener_type (
ListenerTypes
) – Same ashydrogram.Client.listen()
.timeout (
Optional[int]
) – Same ashydrogram.Client.listen()
.unallowed_click_alert (
bool
) – Same ashydrogram.Client.listen()
.user_id (
Optional[Union[int, str], List[Union[int, str]]]
) – The user ID(s) to listen for. Defaults toNone
.message_id (
Optional[Union[int, List[int]]]
) – The message ID(s) to listen for. Defaults toNone
.inline_message_id (
Optional[Union[str, List[str]]]
) – The inline message ID(s) to listen for. Defaults toNone
.args (
Any
) – Additional arguments to pass tohydrogram.Client.send_message()
.kwargs (
Any
) – Additional keyword arguments to pass tohydrogram.Client.send_message()
.
- Returns:
Union[
Message
,CallbackQuery
] – The Message or CallbackQuery