telegram.ext.PreCheckoutQueryHandler¶
- class telegram.ext.PreCheckoutQueryHandler(callback, block=True)[source]¶
Bases:
telegram.ext.BaseHandler
BaseHandler class to handle Telegram
telegram.Update.pre_checkout_query
.Warning
When setting
block
toFalse
, you cannot rely on adding custom attributes totelegram.ext.CallbackContext
. See its docs for more info.See also
- Parameters
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
.block (
bool
, optional) – Determines whether the return value of the callback should be awaited before processing the next handler intelegram.ext.Application.process_update()
. Defaults toTrue
.