Skip to content
Back to top
View this page

# 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`

  Added 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=datetime.timezone.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`