telegram.ChatJoinRequest¶
- class telegram.ChatJoinRequest(*args, **kwargs)[source]¶
Bases:
telegram.TelegramObject
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
chat
,from_user
anddate
are equal.Note
Since Bot API 5.5, bots are allowed to contact users who sent a join request to a chat where the bot is an administrator with the
can_invite_users
administrator right – even if the user never interacted with the bot before.New in version 13.8.
- Parameters
chat (
telegram.Chat
) – Chat to which the request was sent.from_user (
telegram.User
) – User that sent the join request.date (
datetime.datetime
) – Date the request was sent.invite_link (
telegram.ChatInviteLink
, optional) – Chat invite link that was used by the user to send the join request.bot (
telegram.Bot
, optional) – The Bot to use for instance methods.
- async approve(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.approve_chat_join_request( chat_id=update.effective_chat.id, user_id=update.effective_user.id, *args, **kwargs )
For the documentation of the arguments, please see
telegram.Bot.approve_chat_join_request()
.
- async decline(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.decline_chat_join_request( chat_id=update.effective_chat.id, user_id=update.effective_user.id, *args, **kwargs )
For the documentation of the arguments, please see
telegram.Bot.decline_chat_join_request()
.