MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / MessageOriginUser

Class MessageOriginUser

src/telegram/_messageorigin.py:129–160  ·  view source on GitHub ↗

The message was originally sent by a known user. .. versionadded:: 20.8 Args: date (:obj:`datetime.datetime`): Date the message was sent originally. |datetime_localization| sender_user (:class:`telegram.User`): User that sent the message originally. At

Source from the content-addressed store, hash-verified

127
128
129class MessageOriginUser(MessageOrigin):
130 """
131 The message was originally sent by a known user.
132
133 .. versionadded:: 20.8
134
135 Args:
136 date (:obj:`datetime.datetime`): Date the message was sent originally.
137 |datetime_localization|
138 sender_user (:class:`telegram.User`): User that sent the message originally.
139
140 Attributes:
141 type (:obj:`str`): Type of the message origin. Always
142 :tg-const:`~telegram.MessageOrigin.USER`.
143 date (:obj:`datetime.datetime`): Date the message was sent originally.
144 |datetime_localization|
145 sender_user (:class:`telegram.User`): User that sent the message originally.
146 """
147
148 __slots__ = ("sender_user",)
149
150 def __init__(
151 self,
152 date: dtm.datetime,
153 sender_user: User,
154 *,
155 api_kwargs: JSONDict | None = None,
156 ):
157 super().__init__(type=self.USER, date=date, api_kwargs=api_kwargs)
158
159 with self._unfrozen():
160 self.sender_user: User = sender_user
161
162
163class MessageOriginHiddenUser(MessageOrigin):

Callers 5

message_origin_userFunction · 0.90
test_equalityMethod · 0.90
updateFunction · 0.90
message_origin_userFunction · 0.90

Calls

no outgoing calls

Tested by 4

message_origin_userFunction · 0.72
test_equalityMethod · 0.72
updateFunction · 0.72
message_origin_userFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…