import { OmitInputMessageId, ParametersSkip1, Peer, Sticker, Message } from '@mtcute/core'; import { TelegramClient } from '@mtcute/core/client.js'; import { DeleteMessagesParams, ForwardMessageOptions, SendCopyGroupParams, SendCopyParams } from '@mtcute/core/methods.js'; import { UpdateContext } from './base.js'; /** * Context of a message-related update. * * This is a subclass of {@link Message}, so all fields * of the message are available. * * For message groups, own fields are related to the last message * in the group. To access all messages, use {@link MessageContext#messages}. */ export declare class MessageContext extends Message implements UpdateContext { readonly client: TelegramClient; readonly _name: "new_message"; /** * List of messages in the message group. * * For other updates, this is a list with a single element (`this`). */ readonly messages: MessageContext[]; /** Whether this update is about a message group */ readonly isMessageGroup: boolean; constructor(client: TelegramClient, message: Message | Message[]); /** * Get complete information about {@link sender} * * Learn more: [Incomplete peers](https://mtcute.dev/guide/topics/peers.html#incomplete-peers) */ getCompleteSender(): Promise; /** * Get complete information about {@link chat} * * Learn more: [Incomplete peers](https://mtcute.dev/guide/topics/peers.html#incomplete-peers) */ getCompleteChat(): Promise; /** Get a message that this message is a reply to */ getReplyTo(): Promise; /** If this is a channel post, get its automatic forward in the discussion group */ getDiscussionMessage(): Promise; /** Get all custom emojis contained in this message (message group), if any */ getCustomEmojis(): Promise; /** Send a text message to the same chat (and topic, if applicable) as a given message */ answerText(...params: ParametersSkip1): Promise; /** Send a media to the same chat (and topic, if applicable) as a given message */ answerMedia(...params: ParametersSkip1): Promise; /** Send a media group to the same chat (and topic, if applicable) as a given message */ answerMediaGroup(...params: ParametersSkip1): Promise; /** Send a text message in reply to this message */ replyText(...params: ParametersSkip1): Promise; /** Send a media in reply to this message */ replyMedia(...params: ParametersSkip1): Promise; /** Send a media group in reply to this message */ replyMediaGroup(...params: ParametersSkip1): Promise; /** Send a text message in reply to this message */ quoteWithText(params: Parameters[1]): Promise; /** Send a media in reply to this message */ quoteWithMedia(params: Parameters[1]): Promise; /** Send a media group in reply to this message */ quoteWithMediaGroup(params: Parameters[1]): Promise; /** Send a text as a comment to this message */ commentText(...params: ParametersSkip1): Promise; /** Send a media as a comment to this message */ commentMedia(...params: ParametersSkip1): Promise; /** Send a media group as a comment to this message */ commentMediaGroup(...params: ParametersSkip1): Promise; /** Delete this message (message group) */ delete(params?: DeleteMessagesParams): Promise; /** Pin this message */ pin(params?: OmitInputMessageId[0]>): Promise; /** Unpin this message */ unpin(): Promise; /** Edit this message */ edit(params: OmitInputMessageId[0]>): Promise; /** Forward this message (message group) */ forwardTo(params: ForwardMessageOptions): Promise; /** Send a copy of this message (message group) */ copy(params: SendCopyParams & SendCopyGroupParams): Promise | Promise; /** React to this message */ react(params: OmitInputMessageId[0]>): Promise; }