/** * Discord Channel Adapter * * Uses Discord Gateway WebSocket and REST API */ import { BaseChannelAdapter, type ChannelConfig, type ChannelProfile } from "./base.js"; import type { OutboundMessage } from "../types/index.js"; /** Discord channel configuration */ export interface DiscordConfig { /** Bot token */ botToken: string; /** Application ID */ applicationId: string; /** Intents (default: basic + messages + guilds) */ intents?: number; } /** Discord Gateway intents */ export declare const DiscordIntents: { readonly GUILDS: number; readonly GUILD_MEMBERS: number; readonly GUILD_MODERATION: number; readonly GUILD_EMOJIS_AND_STICKERS: number; readonly GUILD_INTEGRATIONS: number; readonly GUILD_WEBHOOKS: number; readonly GUILD_INVITES: number; readonly GUILD_VOICE_STATES: number; readonly GUILD_PRESENCES: number; readonly GUILD_MESSAGES: number; readonly GUILD_MESSAGE_REACTIONS: number; readonly GUILD_MESSAGE_TYPING: number; readonly DIRECT_MESSAGES: number; readonly DIRECT_MESSAGE_REACTIONS: number; readonly DIRECT_MESSAGE_TYPING: number; readonly MESSAGE_CONTENT: number; }; /** Discord adapter */ export declare class DiscordAdapter extends BaseChannelAdapter { readonly channelType = "discord"; private botToken; private applicationId; private intents; private ws?; private sessionId?; private sequenceNumber?; private heartbeatInterval?; private botInfo?; private resumeGatewayUrl?; constructor(config: ChannelConfig); /** Initialize the adapter */ initialize(): Promise; /** Shutdown the adapter */ shutdown(): Promise; /** Send a message to Discord */ send(message: OutboundMessage): Promise; /** Get channel profile */ getProfile(): Promise; private connectGateway; /** Handle Gateway payload */ private handleGatewayPayload; /** Handle Hello opcode */ private handleHello; /** Send heartbeat */ private sendHeartbeat; /** Send identify payload */ private identify; /** Send resume payload */ private resume; /** Handle dispatch event */ private handleDispatch; /** Handle Ready event */ private handleReady; /** Handle message create event */ private handleMessageCreate; /** Check if bot is mentioned */ private isMentioned; /** Clean mentions from text */ private cleanMentions; private apiCall; } //# sourceMappingURL=discord.d.ts.map