import { ChannelCapabilities, ChannelHealthContext, HttpChannelHandler, MessageInboundEvent, SubscriberCreateDto } from '@hexabot-ai/api'; import type { ActionOptions, Source, StdOutgoingMessageEnvelope } from '@hexabot-ai/types'; import { OnModuleDestroy } from '@nestjs/common'; import { DISCORD_CHANNEL_NAME } from './settings.schema'; type EntityHookPayload = { entity?: T; databaseEntity?: T; payload?: Record; }; export default class DiscordChannelHandler extends HttpChannelHandler implements OnModuleDestroy { private readonly sourceService; private readonly languageService; private readonly credentialsModuleRef; private inboundEventDecoder; private outboundMessageEncoder; private discordApi; private credentialService?; private readonly clients; private readonly clientErrors; constructor(); onModuleInit(): Promise; onModuleDestroy(): Promise; getCapabilities(): ChannelCapabilities; handle(_req: unknown, res: unknown, _source: Source): Promise; protected decode(): Promise<[]>; protected doSendMessage(event: MessageInboundEvent, envelope: StdOutgoingMessageEnvelope, options: ActionOptions): Promise<{ mid: string; }>; getSubscriberData(event: MessageInboundEvent): Promise; getSubscriberAvatar(event: MessageInboundEvent): Promise; getMessageAttachments(event: MessageInboundEvent): Promise; getIntegrationHealth(context: ChannelHealthContext): Promise<{ details: { requiredSettings: ("bot_token" | "application_id")[]; connectedSources: number; activeSources?: undefined; missingRequiredSettings?: undefined; disconnectedSources?: undefined; errors?: undefined; }; id: string; kind: "channel" | "service"; name: string; status: "healthy" | "warning" | "unhealthy" | "disabled"; checkedAt: string; reason?: string | undefined; message?: string | undefined; } | { status: "unhealthy"; reason: string; message: string; details: { activeSources: number; missingRequiredSettings: number; disconnectedSources: number; requiredSettings: ("bot_token" | "application_id")[]; errors: { [k: string]: string; }; }; }>; handleSourceMutated(event: EntityHookPayload): Promise; private syncActiveSources; private syncSourceClient; private connectSourceClient; private registerClientListeners; private destroySourceClient; private ensureClientForSourceId; private handleDiscordMessage; private handleDiscordInteraction; private processDecodedPayload; private shouldHandleMessage; private shouldHandleButtonInteraction; private toMessagePayload; private toButtonPayload; private createChannelAttrsFromMessage; private createChannelAttrsFromInteraction; private disableButtonInteractions; private sendTypingIndicator; private resolveTypingTimeout; private sleep; private parseSettings; private parseSettingsWithCredentials; private resolveSettingsCredentials; private resolveCredentialValue; private getCredentialService; private hasCredentialRefs; private hasCredentialValues; private getDefaultLanguageSafe; private getSourceSettings; private getSourceDefaultWorkflowId; private isAllowedGuild; private isDirectMessage; private channelTypeName; private channelName; private isSendableTextChannel; private buttonLabel; private resolveAttachmentName; private fingerprint; private errorMessage; } export {}; //# sourceMappingURL=index.channel.d.ts.map