Skip to content
Back to top
View this page

# SuggestedPostInfo

class telegram.SuggestedPostInfo(state, price=None, send_date=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Contains information about a suggested post.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `state` and `price` are equal.

  Available In

  `telegram.Message.suggested_post_info`

  Added in version 22.4.

  Parameters:

    - state (`str`) – State of the suggested post. Currently, it can be one of `'pending'`, `'approved'`, `'declined'`.

    - price (`SuggestedPostPrice`, optional) – Proposed price of the post. If the field is omitted, then the post is unpaid.

    - send_date (`datetime.datetime`, optional) – Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it. The default timezone of the bot is used for localization, which is UTC unless `telegram.ext.Defaults.tzinfo` is used.

  state

    State of the suggested post. Currently, it can be one of `'pending'`, `'approved'`, `'declined'`.

    Type:

      `str`

  price

    Optional. Proposed price of the post. If the field is omitted, then the post is unpaid.

    Type:

      `SuggestedPostPrice`

  send_date

    Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it. The default timezone of the bot is used for localization, which is UTC unless `telegram.ext.Defaults.tzinfo` is used.

    Type:

      `datetime.datetime`

  APPROVED = 'approved'

    `telegram.constants.SuggestedPostInfoState.APPROVED`

  DECLINED = 'declined'

    `telegram.constants.SuggestedPostInfoState.DECLINED`

  PENDING = 'pending'

    `telegram.constants.SuggestedPostInfoState.PENDING`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.