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

x/grm/src/client/base_client.ts>TelegramBaseClient

MTProto API Client for Deno 🦕
Go to Latest
class TelegramBaseClient
Abstract
import { TelegramBaseClient } from "https://deno.land/x/grm@0.5.1/src/client/base_client.ts";

Constructors

new
TelegramBaseClient(
session: string | Session,
apiId: number,
apiHash: string,
clientParams?: TelegramClientParams,
)

Properties

private
_exportedSenderPromises: Map<number, Promise<MTProtoSender>>
private
_exportedSenderReleaseTimeouts: Map<number, ReturnType<setTimeout>>
protected
_loopStarted: boolean
protected
optional
_proxy: ProxyInterface
__version__
_ALBUMS: Map<string, [ReturnType<setTimeout>, Api.TypeUpdate[]]>
_autoReconnect: boolean
_borrowedSenderPromises: any
optional
_bot: boolean
optional
_config: Api.Config
_connection: Connection
_connectionRetries: number
_destroyed: boolean
_downloadRetries: number
_entityCache: EntityCache
_eventBuilders: [EventBuilder, CallableFunction][]
_floodSleepThreshold: number
_floodWaitedRequests: any
_initRequest: Api.InitConnection
optional
_lastRequest: number
_log: Logger
optional
_parseMode: ParseInterface
_reconnecting: boolean
_requestRetries: number
_retryDelay: number
_securityChecks: boolean
optional
_selfInputPeer: Api.InputPeerUser
_semaphore: Semaphore
optional
_sender: MTProtoSender
_timeout: number
_useIPV6: boolean
apiHash: string
apiId: number
readonly
connected
readonly
disconnected
floodSleepThreshold: number
readonly
logger
writeonly
maxConcurrentDownloads: number
networkSocket: PromisedNetSockets | PromisedWebSockets
session: Session
testServers: boolean
useWSS: boolean

Methods

_authKeyCallback(authKey: AuthKey, dcId: number)
_borrowExportedSender(
dcId: number,
shouldReconnect?: boolean,
existingSender?: MTProtoSender,
): Promise<MTProtoSender>
_connectSender(sender: MTProtoSender, dcId: number)
_createExportedSender(dcId: number)
getDC(_dcId: number, _download: boolean): Promise<{ id: number; ipAddress: string; port: number; }>
getSender(dcId: number): Promise<MTProtoSender>
invoke<R extends Api.AnyRequest>(_request: R): Promise<R["__response"]>
setLogLevel(level: LogLevel | `${LogLevel}`)