- class telegram.MessageOrigin(type, date, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectBase class for telegram MessageOrigin object, it can be one of:
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
typeanddateare equal.Added in version 20.8.
- Parameters:
type (
str) – Type of the message origin, can be on of:USER,HIDDEN_USER,CHAT, orCHANNEL.date (
datetime.datetime) – Date the message was sent originally. The default timezone of the bot is used for localization, which is UTC unlesstelegram.ext.Defaults.tzinfois used.
- date[source]¶
Date the message was sent originally. The default timezone of the bot is used for localization, which is UTC unless
telegram.ext.Defaults.tzinfois used.- Type:
- classmethod de_json(data, bot=None)[source]¶
Converts JSON data to the appropriate
MessageOriginobject, i.e. takes care of selecting the correct subclass.
MessageOrigin - python-telegram-bot v22.6