Account takeout session

Constructors

Properties

Methods

Constructors

Properties

id: Long

Takeout session id

Methods

  • Make an API call using this takeout session

    This method just wraps the query into invokeWithTakeout and passes the control down to TelegramClient.call.

    Type Parameters

    • T extends RpcMethod

    Parameters

    Returns Promise<RpcCallReturn[T["_"]]>

  • Create a proxy over TelegramClient that will use this takeout session to call methods.

    You can optionally provide a function to check if some RPC method should be called via a takeout session or directly, otherwise all methods are called through the takeout session.

    Note: This will return a Proxy object that overrides call method. Using this method requires that your target environment supports Proxy and Reflect APIs

    Parameters

    • Optionalpredicate: ((obj: TlObject) => boolean)

      Function that given the RPC call should determine whether that call should be called via takeout session or not. Returning true will use takeout session, false will not.

        • (obj): boolean
        • Parameters

          • obj: TlObject

          Returns boolean

    Returns ITelegramClient