Toggle table of contents sidebar
InlineQueryHandler¶Bases: telegram.ext.BaseHandler
BaseHandler class to handle Telegram updates that contain a telegram.Update.inline_query
. Optionally based on a regex. Read the documentation of the re
module for more information.
callback (coroutine function) –
The callback function for this handler. Will be called when check_update()
has determined that an update should be processed by this handler. Callback signature:
async def callback(update: Update, context: CallbackContext)
The return value of the callback is usually ignored except for the special case of telegram.ext.ConversationHandler
.
pattern (str
| re.Pattern
, optional) – Regex pattern. If not None
, re.match()
is used on telegram.InlineQuery.query
to determine if an update should be handled by this handler.
Determines whether the return value of the callback should be awaited before processing the next handler in telegram.ext.Application.process_update()
. Defaults to True
.
chat_types (list[str
], optional) –
List of allowed chat types. If passed, will only handle inline queries with the appropriate telegram.InlineQuery.chat_type
.
Added in version 13.5.
The callback function for this handler.
Optional. Regex pattern to test telegram.InlineQuery.query
against.
Optional. List of allowed chat types.
Added in version 13.5.
list[str
]
Determines whether the return value of the callback should be awaited before processing the next handler in telegram.ext.Application.process_update()
.
Determines whether an update should be passed to this handler’s callback
.
update (telegram.Update
| object
) – Incoming update.
Add the result of re.match(pattern, update.inline_query.query)
to CallbackContext.matches
as list with one element.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4