MaybeInaccessibleMessage

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

Bases: telegram.TelegramObject

Base class for Telegram Message Objects.

Currently, that includes telegram.Message and telegram.InaccessibleMessage.

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

Changed in version 21.0: __bool__ is no longer overriden and defaults to Pythons standard implementation.

Added in version 20.8.

Parameters:
message_id[source]

Unique message identifier.

Type:

int

date[source]

Date the message was sent in Unix time or 0 in Unix time. Converted to datetime.datetime

The default timezone of the bot is used for localization, which is UTC unless telegram.ext.Defaults.tzinfo is used.

Type:

datetime.datetime

chat[source]

Conversation the message belongs to.

Type:

telegram.Chat

property is_accessible[source]

Convenience attribute. True, if the date is not 0 in Unix time.

Added in version 20.8.