Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# InaccessibleMessage

class telegram.InaccessibleMessage(chat, message_id, *, api_kwargs=None)

  Bases: `telegram.MaybeInaccessibleMessage`

  This object represents an inaccessible message.

  These are messages that are e.g. deleted.

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

  Available In

  - `telegram.CallbackQuery.message`

  - `telegram.Message.pinned_message`

  New in version 20.8.

  Parameters:

    - message_id (`int`) – Unique message identifier.

    - chat (`telegram.Chat`) – Chat the message belongs to.

  message_id

    Unique message identifier.

    Type:

      `int`

  date

    Always `datetime.datetime(1970, 1, 1, 0, 0, tzinfo=<UTC>)`. The field can be used to differentiate regular and inaccessible messages.

    Type:

      `constants.ZERO_DATE`

  chat

    Chat the message belongs to.

    Type:

      `telegram.Chat`