/** * Multi-Bot Manager * * Manages multiple Discord bot clients for multi-agent system. * Each agent with a dedicated bot_token gets its own Discord client. */ import { Client, type Message } from 'discord.js'; import type { MultiAgentConfig } from './types.js'; /** * Bot instance for an agent */ interface AgentBot { agentId: string; client: Client; token: string; connected: boolean; userId?: string; username?: string; } /** * Multi-Bot Manager * * Creates and manages multiple Discord bot clients, * one for each agent with a dedicated bot_token. */ export declare class MultiBotManager { private config; private bots; private mainBotUserId; private mainBotToken; /** Callback for when an agent bot receives a mention */ private onMentionCallback; constructor(config: MultiAgentConfig); /** * Set main bot user ID (from DiscordGateway) */ setMainBotUserId(userId: string): void; /** * Set main bot token (to avoid duplicate logins) */ setMainBotToken(token: string): void; /** * Register callback for when an agent bot receives a mention */ onMention(callback: (agentId: string, message: Message) => void | Promise): void; /** * Initialize all agent bots */ initialize(): Promise; /** * Create a Discord client for an agent */ private createAgentBot; /** * Get main bot user ID */ getMainBotUserId(): string | null; /** * Check if an agent has its own bot */ hasAgentBot(agentId: string): boolean; /** * Get agent bot */ getAgentBot(agentId: string): AgentBot | undefined; /** * React to a message as a specific agent's bot */ reactAsAgent(agentId: string, channelId: string, messageId: string, emoji: string): Promise; /** * Send a message as a specific agent's bot */ sendAsAgent(agentId: string, channelId: string, content: string): Promise; /** * Send a file (with optional message) as a specific agent's bot */ sendFileAsAgent(agentId: string, channelId: string, filePath: string, message?: string): Promise; /** * Reply to a message as a specific agent's bot */ replyAsAgent(agentId: string, originalMessage: Message, content: string): Promise; /** * Check if a message is from one of our agent bots */ isFromAgentBot(message: Message): string | null; /** * Get all connected agent IDs */ getConnectedAgents(): string[]; /** * Stop a specific agent's bot */ stopAgentBot(agentId: string): Promise; /** * Stop all agent bots */ stopAll(): Promise; /** * Update configuration */ updateConfig(config: MultiAgentConfig): Promise; /** * Get a map of agentId → Discord userId for all connected bots */ getBotUserIdMap(): Map; /** * Resolve an agent ID from a Discord user ID (reverse lookup) */ resolveAgentIdFromUserId(userId: string): string | null; /** * Get status of all bots */ getStatus(): Record; } export {}; //# sourceMappingURL=multi-bot-manager.d.ts.map