Class PassportData

Hierarchy (view full)

Constructors

Properties

credentials: {
    data: string;
    hash: string;
    secret: string;
}

Encrypted credentials required to decrypt the data.

Array containing information about documents and other Telegram Passport elements shared with the bot.

Accessors

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

  • Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change).

    Parameters

    • userId: string | number

      User identifier

    • errors: readonly PassportElementError[]

      An array describing the errors

    Returns Promise<true>

    Returns True on success.