PreCheckoutQueryHandler

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

Bases: telegram.ext.BaseHandler

Handler class to handle Telegram telegram.Update.pre_checkout_query.

Warning

When setting block to False, you cannot rely on adding custom attributes to telegram.ext.CallbackContext. See its docs for more info.

Examples

Payment Bot

Parameters:
callback[source]

The callback function for this handler.

Type:

coroutine function

block[source]

Determines whether the callback will run in a blocking way..

Type:

bool

pattern[source]

Optional. Regex pattern to test telegram.PreCheckoutQuery.invoice_payload against.

New in version 20.8.

Type:

str | re.Pattern, optional

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