UNPKG

@wasserstoff/mangi-tg-bot

Version:

A powerful Telegram Bot SDK with built-in authentication, session management, and database integration

45 lines 1.33 kB
import { logger } from "./logger"; import { BotManager } from "./bot/BotManager"; import { TelegramClient } from "telegram"; import { CustomContext } from "./bot/context/CustomContext"; export interface AppConfig { botToken: string; botMode: string; botWebhookUrl?: string; botAllowedUpdates: string[]; redisUrl: string; isDev: boolean; useAuth?: "fully" | "partial" | "none"; jwtSecret?: string; adminAuthentication?: boolean; adminChatIds?: number[]; } export declare class Bot { private botManager?; private redisManager; private config; constructor(config: AppConfig); /** * Initialize the bot and connect to all required services */ initialize(): Promise<void>; /** * Get the Redis client instance */ getRedisClient(): import("ioredis").default; private setupShutdown; MangiClient(apiId: number, apiHash: string, stringSession?: string): TelegramClient; /** * Cleanup and disconnect from all services */ cleanup(): Promise<void>; /** * Get the bot manager instance */ getBotManager(): BotManager; } export { RedisManager } from "./database/RedisManager"; export { TelegramManager } from "./bot/BotClient"; export { CustomContext }; export { logger }; //# sourceMappingURL=index.d.ts.map