telegram.ext.ContextTypes#

class telegram.ext.ContextTypes(context=<class 'telegram.ext._callbackcontext.CallbackContext'>, bot_data=<class 'dict'>, chat_data=<class 'dict'>, user_data=<class 'dict'>)[source]#

Bases: typing.Generic

Convenience class to gather customizable types of the telegram.ext.CallbackContext interface.

New in version 13.6.

Parameters
property bot_data[source]#

The type of context.bot_data of all (error-)handler callbacks and job callbacks.

property chat_data[source]#

The type of context.chat_data of all (error-)handler callbacks and job callbacks.

property context[source]#

The type of the context argument of all (error-)handler callbacks and job callbacks.

property user_data[source]#

The type of context.user_data of all (error-)handler callbacks and job callbacks.