UNPKG

tgsnake

Version:

Telegram MTProto framework for nodejs.

34 lines (33 loc) 985 B
import { Clients, Storages, TypeLogLevel } from '../platform.node.js'; import type { PluginApiFn, PluginApiObj } from '../Plugins/index.js'; export interface Options { apiId: number; apiHash: string; login: LoginWithSession; logLevel?: TypeLogLevel | Array<TypeLogLevel>; clientOptions?: Clients.Client.ClientOptions; plugins?: Array<PluginApiFn | PluginApiObj>; experimental?: ExperimentalOptions; } export interface LoginWithSession { session?: string | Storages.AbstractSession; botToken?: string; forceDotSession?: boolean; sessionName?: string; loginAs?: 'bot' | 'user'; } export interface ExperimentalOptions { alwaysOnline?: boolean; onlineOnStart?: boolean; shutdown?: boolean; customPath?: CustomablePath; syncEvery?: number; syncTimeout?: number; alwaysSync?: boolean; } export interface CustomablePath { loginDir?: string; loginExt?: string; cacheDir?: string; cacheExt?: string; }