This document provides a comprehensive breakdown of how messages flow through the Telegram plugin system.
interface TelegramMessageState { // Core message data messageId: number; chatId: string; userId: string; timestamp: Date; // Content text?: string; media?: MediaAttachment[]; // Context replyToMessageId?: number; threadId?: number; editedAt?: Date; // Metadata entities?: MessageEntity[]; buttons?: InlineKeyboardButton[][]; }
interface TelegramChatState { chatId: string; chatType: 'private' | 'group' | 'supergroup' | 'channel'; title?: string; username?: string; // Settings allowedUsers?: string[]; messageLimit: number; // Forum support isForumChat: boolean; topics: Map<number, TopicState>; // History messages: TelegramMessage[]; lastActivity: Date; }
interface CallbackState { messageId: number; chatId: string; callbackData: string; userId: string; timestamp: Date; // For maintaining state originalMessage?: TelegramMessage; context?: any; }
Was this page helpful?