/**
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
* Copyright (C) 2023-2026 Roj
*
* This file is part of MTKruto.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
import { Api } from "../2_tl.js";
import { type InlineQueryResult, type InputChecklistItem, type InputMedia, type InputPollOption, type MessageCounters, type MessageGetter, type MessageList, type MessageLivePhoto, type MessagePhoto, type PriceTag, type TextToTranslate, type TranslatedText, type VoiceTranscription } from "../3_types.js";
import { type ChatActionType, type FileSource, FileType, type ID, type Message, type MessageEntity, type ParseMode, type Reaction, type Update, type UsernameResolver } from "../3_types.js";
import type { AddReactionParams, DeleteMessagesParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageTextParams, ForwardMessagesParams, GetBlockedUsersParams, GetHistoryParams, GetMessageReactionsParams, GetSavedChatsParams, GetSavedMessagesParams, OpenMiniAppParams, PinMessageParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChatActionParams, SendChecklistParams as SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetReactionsParams, StartBotParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UnpinMessageParams, UnpinMessagesParams } from "./0_params.js";
import type { UpdateProcessor } from "./0_update_processor.js";
import type { C as C_ } from "./1_types.js";
import type { FileManager } from "./2_file_manager.js";
interface C extends C_ {
fileManager: FileManager;
}
declare const messageManagerUpdates: readonly ["updateNewMessage", "updateNewChannelMessage", "updateEditMessage", "updateNewScheduledMessage", "updateEditChannelMessage", "updateBotNewBusinessMessage", "updateBotEditBusinessMessage", "updateBotDeleteBusinessMessage", "updateDeleteMessages", "updateDeleteChannelMessages", "updateDeleteScheduledMessages", "updateTranscribedAudio", "updateUserTyping", "updateChatUserTyping", "updateChannelUserTyping", "updateBotGuestChatQuery"];
type MessageManagerUpdate = Api.Types[(typeof messageManagerUpdates)[number]];
export declare class MessageManager implements UpdateProcessor {
#private;
constructor(c: C);
getMessages(chatId: ID, messageIds: number[]): Promise;
getMessageWithReply(chatId: ID, messageId: number): Promise;
getMessage(chatId: ID, messageId: number): Promise;
static parseText(text: string, entities: MessageEntity[], parseMode: ParseMode, isEmptyAllowed?: boolean): [string, MessageEntity[]];
parseText(text_: string, params?: {
parseMode?: ParseMode;
entities?: MessageEntity[];
}, isEmptyAllowed?: boolean): readonly [string, Api.MessageEntity[] | undefined];
updatesToMessages(chatId: ID, updates: Api.Updates, businessConnectionId?: string): Promise;
constructMessage(message_: Api.Message, r?: boolean, business?: {
connectionId: string;
replyToMessage?: Api.Message;
}, messageGetter?: MessageGetter): Promise;
forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams): Promise;
getHistory(chatId: ID, params?: GetHistoryParams): Promise;
usernameResolver: UsernameResolver;
sendMessageDraft(chatId: ID, draftId: number, text: string, params?: SendMessageDraftParams): Promise;
sendMessage(chatId: ID, text: string, params?: SendMessageParams): Promise;
sendVenue(chatId: ID, latitude: number, longitude: number, title: string, address: string, params?: SendVenueParams): Promise;
sendContact(chatId: ID, firstName: string, number: string, params?: SendContactParams): Promise;
sendDice(chatId: ID, params?: SendDiceParams): Promise;
sendLocation(chatId: ID, latitude: number, longitude: number, params?: SendLocationParams): Promise;
sendVideoNote(chatId: ID, audio: FileSource, params?: SendVideoNoteParams): Promise;
sendAudio(chatId: ID, audio: FileSource, params?: SendAudioParams): Promise;
sendVoice(chatId: ID, voice: FileSource, params?: SendVoiceParams): Promise;
sendAnimation(chatId: ID, animation: FileSource, params?: SendAnimationParams): Promise;
sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise;
sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise;
sendSticker(chatId: ID, sticker: FileSource, params?: SendStickerParams): Promise;
sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise;
sendLivePhoto(chatId: ID, photo: FileSource, video: FileSource, params?: SendPhotoParams): Promise;
resolveFileId(maybeFileId: string, expectedFileType: FileType | FileType[]): {
id: bigint;
access_hash: bigint;
file_reference: Uint8Array;
} | null;
sendPoll(chatId: ID, question: string, options: InputPollOption[], params?: SendPollParams): Promise;
sendChecklist(chatId: ID, title: string, items: InputChecklistItem[], params?: SendChecklistParams): Promise;
editMessageReplyMarkup(chatId: ID, messageId: number, params?: EditMessageReplyMarkupParams): Promise;
editInlineMessageReplyMarkup(inlineMessageId: string, params?: EditMessageReplyMarkupParams): Promise;
editMessageText(chatId: ID, messageId: number, text: string, params?: EditMessageTextParams): Promise;
editMessageCaption(chatId: ID, messageId: number, params?: EditMessageCaptionParams): Promise;
editInlineMessageText(inlineMessageId: string, text: string, params?: EditInlineMessageTextParams): Promise;
editInlineMessageCaption(inlineMessageId: string, params?: EditInlineMessageCaptionParams): Promise;
editMessageMedia(chatId: ID, messageId: number, media: InputMedia, params?: EditMessageMediaParams): Promise;
editInlineMessageMedia(inlineMessageId: string, media: InputMedia, params?: EditInlineMessageMediaParams): Promise;
deleteMessages(chatId: ID, messageIds: number[], params?: DeleteMessagesParams): Promise;
deleteScheduledMessages(chatId: ID, messageIds: number[]): Promise;
deleteScheduledMessage(chatId: ID, messageId: number): Promise;
sendScheduledMessages(chatId: ID, messageIds: number[]): Promise;
sendScheduledMessage(chatId: ID, messageId: number): Promise;
deleteChatMemberMessages(chatId: ID, memberId: ID): Promise;
pinMessage(chatId: ID, messageId: number, params?: PinMessageParams): Promise;
unpinMessage(chatId: ID, messageId: number, params?: UnpinMessageParams): Promise;
unpinMessages(chatId: ID, params?: UnpinMessagesParams): Promise;
setReactions(chatId: ID, messageId: number, reactions: Reaction[], params?: SetReactionsParams): Promise;
addReaction(chatId: ID, messageId: number, reaction: Reaction, params?: AddReactionParams): Promise;
removeReaction(chatId: ID, messageId: number, reaction: Reaction): Promise;
removeUserReaction(chatId: ID, messageId: number, userId: ID): Promise;
removeUserReactions(chatId: ID, userId: ID): Promise;
clearRecentReactions(): Promise;
canHandleUpdate(update: Api.Update): update is MessageManagerUpdate;
handleUpdate(update: MessageManagerUpdate): Promise;
sendChatAction(chatId: ID, action: ChatActionType, params?: SendChatActionParams): Promise;
searchMessages(params?: SearchMessagesParams): Promise;
blockUser(userId: ID): Promise;
unblockUser(userId: ID): Promise;
getBlockedUsers(params?: GetBlockedUsersParams): Promise;
setChatStickerSet(chatId: ID, setName: string): Promise;
deleteChatStickerSet(chatId: ID): Promise;
stopPoll(chatId: ID, messageId: number, params?: StopPollParams): Promise;
editMessageLiveLocation(chatId: ID, messageId: number, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise;
editInlineMessageLiveLocation(inlineMessageId: string, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise;
sendInvoice(chatId: ID, title: string, description: string, payload: string, currency: string, prices: PriceTag[], params?: SendInvoiceParams): Promise;
sendMediaGroup(chatId: ID, media: InputMedia[], params?: SendMediaGroupParams): Promise;
readMessages(chatId: ID, untilMessageId: number): Promise;
startBot(botId: ID, params?: StartBotParams): Promise;
transcribeVoice(chatId: ID, messageId: number): Promise;
resolveMessageLink(link: string): Promise;
static parseMessageLink(link: string): [ID, number] | null;
openMiniApp(botId: ID, chatId: ID, params?: OpenMiniAppParams): Promise;
getSavedMessages(chatId: ID, params?: GetSavedMessagesParams): Promise;
getSavedChats(params?: GetSavedChatsParams): Promise;
getMessageReactions(chatId: ID, messageId: number, params?: GetMessageReactionsParams): Promise;
setDefaultReaction(reaction: Reaction): Promise;
clearDrafts(): Promise;
summarizeText(chatId: ID, messageId: number, params?: SummarizeTextParams): Promise;
answerGuestQuery(id: string, result_: InlineQueryResult): Promise;
viewMessages(chatId: ID, messageIds: number[]): Promise;
viewMessage(chatId: ID, messageId: number): Promise;
getMessagesCounters(chatId: ID, messageIds: number[]): Promise;
getMessageCounters(chatId: ID, messageId: number): Promise;
translateTexts(toLanguage: string, texts: TextToTranslate[], params?: TranslateTextParams): Promise;
translateText(toLanguage: string, text: TextToTranslate, params?: TranslateTextParams): Promise;
translateMessages(toLanguage: string, chatId: ID, messageIds: number[], params?: TranslateTextParams): Promise;
translateMessage(toLanguage: string, chatId: ID, messageId: number, params?: TranslateTextParams): Promise;
}
export {};
//# sourceMappingURL=3_message_manager.d.ts.map