ChatJoinRequest#

class aiogram.types.chat_join_request.ChatJoinRequest(*, chat: Chat, from_user: User, user_chat_id: int, date: datetime, bio: Optional[str] = None, invite_link: Optional[ChatInviteLink] = None, **extra_data: Any)[source]#

Represents a join request sent to a chat.

Source: https://core.telegram.org/bots/api#chatjoinrequest

chat: Chat#

Chat to which the request was sent

from_user: User#

User that sent the join request

user_chat_id: int#

Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.

date: datetime.datetime#

Date the request was sent in Unix time

bio: Optional[str]#

Optional. Bio of the user.

Optional. Chat invite link that was used by the user to send the join request

approve(**kwargs: Any) ApproveChatJoinRequest[source]#

Shortcut for method aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest will automatically fill method attributes:

  • chat_id

  • user_id

Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

Source: https://core.telegram.org/bots/api#approvechatjoinrequest

Returns:

instance of method aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest

decline(**kwargs: Any) DeclineChatJoinRequest[source]#

Shortcut for method aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest will automatically fill method attributes:

  • chat_id

  • user_id

Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

Source: https://core.telegram.org/bots/api#declinechatjoinrequest

Returns:

instance of method aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest