telegram.ext.PollAnswerHandler

class telegram.ext.PollAnswerHandler(callback, block=True)[source]

Bases: telegram.ext.BaseHandler

BaseHandler class to handle Telegram updates that contain a poll answer.

Warning

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

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

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