Chat.listen()¶
- Chat.listen()[source]¶
Bound method listen of
Chat
.Use as a shortcut for:
await client.listen(chat_id=chat_id)
Example
await chat.listen()
- Parameters:
filters (
Optional[filters.Filter]
) – A filter to check if the listener should be fulfilled.listener_type (
ListenerTypes
) – The type of listener to create. Defaults tohydrogram.types.ListenerTypes.MESSAGE
.timeout (
Optional[int]
) – The maximum amount of time to wait for the listener to be fulfilled. Defaults toNone
.unallowed_click_alert (
bool
) – Whether to alert the user if they click on a button that is not intended for them. Defaults toTrue
.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
.
- Returns:
Union[
Message
,CallbackQuery
] – The Message or CallbackQuery