ChatJoinRequest

class ftmgram.types.ChatJoinRequest(*, client: Client = None, chat: Chat, from_user: User, date: datetime, bio: str | None = None, invite_link: ChatInviteLink | None = None, query_id: str | None = None)

Represents a join request sent to a chat.

Parameters:
  • chat (Chat) – Chat to which the request was sent.

  • from_user (User) – User that sent the join request.

  • date (datetime) – Date the request was sent.

  • bio (str, optional) – Bio of the user.

  • invite_link (ChatInviteLink, optional) – Chat invite link that was used by the user to send the join request.

  • query_id (str, optional) – Identifier of the join request query. For bots assigned to process join request only. If present, then the bot must call send_chat_join_request_web_app() or directly call answer_chat_join_request_query() within 10 seconds.

approve() bool

Bound method approve of ChatJoinRequest.

Use as a shortcut for:

await client.approve_chat_join_request(
    chat_id=request.chat.id,
    user_id=request.from_user.id
)

Example

await request.approve()
Returns:

bool – True on success.

Raises:

RPCError – In case of a Telegram RPC error.

decline() bool

Bound method decline of ChatJoinRequest.

Use as a shortcut for:

await client.decline_chat_join_request(
    chat_id=request.chat.id,
    user_id=request.from_user.id
)

Example

await request.decline()
Returns:

bool – True on success.

Raises:

RPCError – In case of a Telegram RPC error.