@chinchillaenterprises/mcp-discord
Version:
Modular Discord MCP server with 45+ tools for comprehensive server management, featuring clean architecture and discord_ prefixed tools
82 lines • 2.13 kB
TypeScript
import { Client } from "discord.js";
import { DiscordAccount, AccountState } from "../types/account.js";
import { CredentialManager } from "./credential-manager.js";
/**
* Manages the current state of Discord accounts and active connections
*/
export declare class AccountStateManager {
private state;
private credentialManager;
constructor(credentialManager: CredentialManager);
/**
* Initialize account state by loading all saved accounts
*/
initialize(): Promise<void>;
/**
* Get the currently active account
*/
getActiveAccount(): DiscordAccount | null;
/**
* Get a specific account by ID
*/
getAccount(accountId: string): DiscordAccount | null;
/**
* Get all accounts
*/
getAllAccounts(): DiscordAccount[];
/**
* Add a new account
*/
addAccount(account: DiscordAccount): void;
/**
* Update an existing account
*/
updateAccount(account: DiscordAccount): void;
/**
* Remove an account
*/
removeAccount(accountId: string): void;
/**
* Switch to a different account
*/
switchAccount(accountId: string): boolean;
/**
* Set an account as default
*/
setDefaultAccount(accountId: string): void;
/**
* Get or create a Discord client for the specified account
*/
getClient(accountId: string): Client | null;
/**
* Store a Discord client for an account
*/
setClient(accountId: string, client: Client): void;
/**
* Get the active client
*/
getActiveClient(): Client | null;
/**
* Remove a client connection
*/
removeClient(accountId: string): void;
/**
* Check if there are any active accounts
*/
hasAccounts(): boolean;
/**
* Get account summary for display
*/
getAccountSummary(): Array<{
id: string;
name: string;
isActive: boolean;
isDefault: boolean;
isConnected: boolean;
}>;
/**
* Get the internal state object
*/
getState(): AccountState;
}
//# sourceMappingURL=account-state.d.ts.map