Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# PersistenceInput

class telegram.ext.PersistenceInput(bot_data=True, chat_data=True, user_data=True, callback_data=True)

  Bases: `NamedTuple`

  Convenience wrapper to group boolean input for the `store_data` parameter for `BasePersistence`.

  Available In

  - `telegram.ext.BasePersistence.store_data`

  - `telegram.ext.DictPersistence.store_data`

  - `telegram.ext.PicklePersistence.store_data`

  Parameters:

    - bot_data (`bool`, optional) – Whether the setting should be applied for `bot_data`. Defaults to `True`.

    - chat_data (`bool`, optional) – Whether the setting should be applied for `chat_data`. Defaults to `True`.

    - user_data (`bool`, optional) – Whether the setting should be applied for `user_data`. Defaults to `True`.

    - callback_data (`bool`, optional) – Whether the setting should be applied for `callback_data`. Defaults to `True`.

  bot_data

    Whether the setting should be applied for `bot_data`.

    Type:

      `bool`

  chat_data

    Whether the setting should be applied for `chat_data`.

    Type:

      `bool`

  user_data

    Whether the setting should be applied for `user_data`.

    Type:

      `bool`

  callback_data

    Whether the setting should be applied for `callback_data`.

    Type:

      `bool`