PollAnswerHandler¶
class telegram.ext.PollAnswerHandler(callback, block=True)[source]¶Bases: telegram.ext.BaseHandler
Handler 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.
Examples
Use In
Available In
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.
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.
See also
The callback function for this handler.
Type: block[source]¶Determines whether the callback will run in a blocking way..
Type: check_update(update)[source]¶Determines whether an update should be passed to this handler’s callback.
Parameters:update (telegram.Update | object) – Incoming update.
Returns: