InaccessibleMessage

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

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

Added in version 20.8.

Parameters:
message_id[source]

Unique message identifier.

Type:

int

date[source]

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[source]

Chat the message belongs to.

Type:

telegram.Chat