Class ChatJoinRequest

Hierarchy (view full)

Constructors

Properties

author: User

User that sent the join request

bio?: string

Bio of the user

chat: Chat

Chat to which the request was sent

createdUnixTime: number

Date the request was sent in Unix time

inviteLink?: ChatInviteLink

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

userChatId: string

Identifier of a private chat with the user who sent the join request. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.

Accessors

  • get createdTimestamp(): number
  • Return the timestamp request was sent, in milliseconds

    Returns number

Methods

  • Protected

    Patches the current instance with new data

    Parameters

    • data: Record<string, any>

      The data to patch the instance with

    Returns Record<string, any>

    The patched data

  • Protected

    Updates the current instance with new data and returns a clone of the updated instance

    Parameters

    • data: Record<string, any>

      The data to update the instance with

    Returns Base

    A clone of the updated instance

  • 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 Promise<true>

    Returns True on success.

  • 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 Promise<true>

    Returns True on success.