Documentation - v0.32.2
    Preparing search index...

    Function toggleJoinRequests

    • Set whether a channel/supergroup has join requests enabled.

      Note: by default, this method only affects primary invite links. Additional invite links may exist with the opposite setting, unless applyToInviteLinks is passed.

      Parameters

      • client: ITelegramClient
      • chatId: InputPeerLike

        Chat ID or username

      • enabled: boolean = false

        Whether join requests should be enabled

      • Optionalparams: { applyToInviteLinks?: boolean; guardBot?: InputPeerLike }
        • OptionalapplyToInviteLinks?: boolean

          Whether to apply the change to the existing invite links, including the primary one

        • OptionalguardBot?: InputPeerLike

          Bot that will be the guard bot in the group, i.e. will approve or decline join requests. Ignored if enabled is false.

          The bot must be an admin with inviteUsers right, and must be marked as a guard bot.

      Returns Promise<void>