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

Class ChatBoostUpdated

src/telegram/_chatboost.py:301–343  ·  view source on GitHub ↗

This object represents a boost added to a chat or changed. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`chat`, and :attr:`boost` are equal. .. versionadded:: 20.8 Args: chat (:class:`telegram.Cha

Source from the content-addressed store, hash-verified

299
300
301class ChatBoostUpdated(TelegramObject):
302 """This object represents a boost added to a chat or changed.
303
304 Objects of this class are comparable in terms of equality. Two objects of this class are
305 considered equal, if their :attr:`chat`, and :attr:`boost` are equal.
306
307 .. versionadded:: 20.8
308
309 Args:
310 chat (:class:`telegram.Chat`): Chat which was boosted.
311 boost (:class:`telegram.ChatBoost`): Information about the chat boost.
312
313 Attributes:
314 chat (:class:`telegram.Chat`): Chat which was boosted.
315 boost (:class:`telegram.ChatBoost`): Information about the chat boost.
316 """
317
318 __slots__ = ("boost", "chat")
319
320 def __init__(
321 self,
322 chat: Chat,
323 boost: ChatBoost,
324 *,
325 api_kwargs: JSONDict | None = None,
326 ):
327 super().__init__(api_kwargs=api_kwargs)
328
329 self.chat: Chat = chat
330 self.boost: ChatBoost = boost
331
332 self._id_attrs = (self.chat.id, self.boost)
333 self._freeze()
334
335 @classmethod
336 def de_json(cls, data: JSONDict, bot: "Bot | None" = None) -> "ChatBoostUpdated":
337 """See :meth:`telegram.TelegramObject.de_json`."""
338 data = cls._parse_data(data)
339
340 data["chat"] = de_json_optional(data.get("chat"), Chat, bot)
341 data["boost"] = de_json_optional(data.get("boost"), ChatBoost, bot)
342
343 return super().de_json(data=data, bot=bot)
344
345
346class ChatBoostRemoved(TelegramObject):

Callers 5

test_update.pyFile · 0.90
chat_boost_updatedFunction · 0.90
test_equalityMethod · 0.90
chat_boost_updatedFunction · 0.90

Calls

no outgoing calls

Tested by 4

chat_boost_updatedFunction · 0.72
test_equalityMethod · 0.72
chat_boost_updatedFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…