A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.python-telegram-bot.org/telegram.ext.inlinequeryhandler.html below:

InlineQueryHandler - python-telegram-bot v22.3

Back to top

Toggle table of contents sidebar

InlineQueryHandler
class telegram.ext.InlineQueryHandler(callback, pattern=None, block=True, chat_types=None)[source]

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.

Parameters:
callback[source]

The callback function for this handler.

Type:

coroutine function

pattern[source]

Optional. Regex pattern to test telegram.InlineQuery.query against.

Type:

str | re.Pattern

chat_types[source]

Optional. List of allowed chat types.

Added in version 13.5.

Type:

list[str]

block[source]

Determines whether the return value of the callback should be awaited before processing the next handler in telegram.ext.Application.process_update().

Type:

bool

check_update(update)[source]

Determines whether an update should be passed to this handler’s callback.

Parameters:

update (telegram.Update | object) – Incoming update.

Returns:

bool | re.match

collect_additional_context(context, update, application, check_result)[source]

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