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

Class ChatJoinRequest

src/telegram/_chatjoinrequest.py:37–210  ·  view source on GitHub ↗

This object represents a join request sent to a chat. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`chat`, :attr:`from_user` and :attr:`date` are equal. Note: * Since Bot API 5.5, bots are allowed to c

Source from the content-addressed store, hash-verified

35
36
37class ChatJoinRequest(TelegramObject):
38 """This object represents a join request sent to a chat.
39
40 Objects of this class are comparable in terms of equality. Two objects of this class are
41 considered equal, if their :attr:`chat`, :attr:`from_user` and :attr:`date` are equal.
42
43 Note:
44 * Since Bot API 5.5, bots are allowed to contact users who sent a join request to a chat
45 where the bot is an administrator with the
46 :attr:`~telegram.ChatMemberAdministrator.can_invite_users` administrator right - even
47 if the user never interacted with the bot before.
48 * Telegram does not guarantee that :attr:`from_user.id <from_user>` coincides with the
49 ``chat_id`` of the user. Please use :attr:`user_chat_id` to contact the user in
50 response to their join request.
51
52 .. versionadded:: 13.8
53 .. versionchanged:: 20.1
54 In Bot API 6.5 the argument :paramref:`user_chat_id` was added, which changes the position
55 of the optional arguments :paramref:`bio` and :paramref:`invite_link`.
56
57 Args:
58 chat (:class:`telegram.Chat`): Chat to which the request was sent.
59 from_user (:class:`telegram.User`): User that sent the join request.
60 date (:class:`datetime.datetime`): Date the request was sent.
61
62 .. versionchanged:: 20.3
63 |datetime_localization|
64 user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join
65 request. This number may have more than 32 significant bits and some programming
66 languages may have difficulty/silent defects in interpreting it. But it has at most 52
67 significant bits, so a 64-bit integer or double-precision float type are safe for
68 storing this identifier. The bot can use this identifier for 5 minutes to send messages
69 until the join request is processed, assuming no other administrator contacted the
70 user.
71
72 .. versionadded:: 20.1
73 bio (:obj:`str`, optional): Bio of the user.
74 invite_link (:class:`telegram.ChatInviteLink`, optional): Chat invite link that was used
75 by the user to send the join request.
76
77 Attributes:
78 chat (:class:`telegram.Chat`): Chat to which the request was sent.
79 from_user (:class:`telegram.User`): User that sent the join request.
80 date (:class:`datetime.datetime`): Date the request was sent.
81
82 .. versionchanged:: 20.3
83 |datetime_localization|
84 user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join
85 request. This number may have more than 32 significant bits and some programming
86 languages may have difficulty/silent defects in interpreting it. But it has at most 52
87 significant bits, so a 64-bit integer or double-precision float type are safe for
88 storing this identifier. The bot can use this identifier for 5 minutes to send messages
89 until the join request is processed, assuming no other administrator contacted the
90 user.
91
92 .. versionadded:: 20.1
93 bio (:obj:`str`): Optional. Bio of the user.
94 invite_link (:class:`telegram.ChatInviteLink`): Optional. Chat invite link that was used

Callers 4

test_update.pyFile · 0.90
chat_join_requestFunction · 0.90
test_equalityMethod · 0.90
chat_join_requestFunction · 0.90

Calls

no outgoing calls

Tested by 3

chat_join_requestFunction · 0.72
test_equalityMethod · 0.72
chat_join_requestFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…