ams-ssk
Version:
NestJS AMS Library for file management
21 lines (20 loc) • 735 B
TypeScript
import TelegramBot from 'node-telegram-bot-api';
import { tgBotConfig } from '../config/bot.config';
export declare class TelegramLoadBalancer {
private readonly bots;
private readonly logger;
getBotOperationCount(bot: TelegramBot): number;
getBotMaxOperations(bot: TelegramBot): number;
getBotUtilizationPercentage(bot: TelegramBot): number;
addBot(config: tgBotConfig): void;
getNextBot(): TelegramBot;
releaseBot(bot: TelegramBot): void;
getAllBots(): TelegramBot[];
getBotToken(bot: TelegramBot): string | undefined;
getBotByToken(token: string): TelegramBot | undefined;
getBots(): {
bot: TelegramBot;
operationCount: number;
config: tgBotConfig;
}[];
}