Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/mtkruto/client/client.ts>Client

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class Client
import { Client } from "https://deno.land/x/mtkruto@0.0.820/client/client.ts";

Constructors

new
Client(
session?: Session,
apiId?,
apiHash?,
params?: { transportProvider?: TransportProvider; appVersion?: string; deviceModel?: string; langCode?: string; langPack?: string; systemLangCode?: string; systemVersion?: string; },
)

Properties

private
promises: Map<bigint, { resolve: (obj: MaybeVectorTLObject) => void; reject: (err: MaybeVectorTLObject) => void; }>
private
sessionId
private
shouldLoadSession: boolean
private
state: { salt: bigint; seqNo: number; }
private
toAcknowledge: Set<bigint>
readonly
appVersion: string
readonly
deviceModel: string
readonly
langCode: string
readonly
langPack: string
readonly
systemLangCode: string
readonly
systemVersion: string
updatesHandler: UpdatesHandler

Methods

private
pingLoop()
private
receiveLoop()
authorize(params: string | types.AuthExportedAuthorization | AuthorizeUserParams)
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<T extends functions.Function<unknown> ? T["__R"] : void>
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait: true): Promise<void>
send<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T)
setDc(dc: DC)