Documentation - v0.27.0
    Preparing search index...

    Class TakeoutSession

    Account takeout session

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    id: Long

    Takeout session id

    Methods

    • 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.

      Parameters

      • Optionalparams: RpcCallOptions & {
            predicate?: (obj: TlObject) => boolean;
            withMessageRange?: RawMessageRange;
        }
        • Optionalpredicate?: (obj: TlObject) => boolean

          Function that given the RPC call should determine whether that call should be called via takeout session (and use the rest of the params passed here) or not. Returning true will use takeout session, false will call the method directly.

          undefined, i.e. all calls are sent via takeout session

        • OptionalwithMessageRange?: RawMessageRange

          If passed, the request will be wrapped in an invokeWithMessagesRange

      Returns ITelegramClient