import { UserConfig } from "../config"; import { PlatformAdapter } from "./platform-adapter"; export interface User { id: string; username: string; config?: UserConfig | null; meta?: any; } export interface SentMessage extends Message { deletable: boolean; delete: () => Promise; edit: (data: any) => Promise; } export interface Attachment { url: string; contentType?: string; data?: Buffer | string; type?: string; } export interface Embed { [key: string]: any; } export interface MessageData { content?: string; embeds?: Embed[]; file?: | { url: string; } | { path: string }; } export interface Message { id: string; content: string; author: User; timestamp: Date; channelId: string; threadId?: string; attachments?: Attachment[]; embeds?: Embed[]; source: any; // Original message object (from Discord or WhatsApp) platform: "discord" | "whatsapp" | "other"; reply: (data: MessageData) => Promise; send: (data: MessageData) => Promise; getUserRoles: () => string[]; isDirectMessage: () => Promise; sendDirectMessage: ( userId: string, messageData: MessageData ) => Promise; sendMessageToChannel: ( channelId: string, messageData: MessageData ) => Promise; sendFile: (fileUrl: string, fileName: string) => Promise; fetchChannelMessages: (limit: number) => Promise; sendTyping: () => Promise; platformAdapter: PlatformAdapter; }