telegram.utils.types Module

This module contains custom typing aliases.

telegram.utils.types.ConversationDict = typing.Dict[typing.Tuple[int, ...], typing.Union[object, NoneType]]

Dicts as maintained by the telegram.ext.ConversationHandler.

telegram.utils.types.FileLike = typing.Union[typing.IO, ForwardRef('InputFile')]

Either an open file handler or in telegram.InputFile.

telegram.utils.types.HandlerArg = typing.Union[str, ForwardRef('Update')]

The argument that handlers parse for telegram.ext.handler.check_update() etc.

telegram.utils.types.JSONDict = typing.Dict[str, typing.Any]

Dictionary containing response from Telegram or data to send to the API.