telegram.ext.ExtBot¶
-
class
telegram.ext.
ExtBot
(token, base_url=None, base_file_url=None, request=None, private_key=None, private_key_password=None, defaults=None, arbitrary_callback_data=False)¶ Bases:
telegram.bot.Bot
This object represents a Telegram Bot with convenience extensions.
Warning
Not to be confused with
telegram.Bot
.For the documentation of the arguments, methods and attributes, please see
telegram.Bot
.New in version 13.6.
- Parameters
defaults (
telegram.ext.Defaults
, optional) – An object containing default values to be used if not set explicitly in the bot methods.arbitrary_callback_data (
bool
|int
, optional) – Whether to allow arbitrary objects as callback data fortelegram.InlineKeyboardButton
. Pass an integer to specify the maximum number of objects cached in memory. For more details, please see our wiki. Defaults toFalse
.
-
arbitrary_callback_data
¶ Whether this bot instance allows to use arbitrary objects as callback data for
telegram.InlineKeyboardButton
.- Type
bool
|int
-
callback_data_cache
¶ The cache for objects passed as callback data for
telegram.InlineKeyboardButton
.