import type { Readable } from "node:stream"; import type { TelegramBotSubscriptionUpdated, TelegramBusinessBotRights, TelegramBusinessConnection, TelegramBusinessMessagesDeleted, TelegramCallbackQuery, TelegramChatBackground, TelegramChatBoostAdded, TelegramChatBoostRemoved, TelegramChatBoostSource, TelegramChatBoostUpdated, TelegramChatJoinRequest, TelegramChatMemberUpdated, TelegramChatOwnerChanged, TelegramChatOwnerLeft, TelegramChatPermissions, TelegramChecklist, TelegramChecklistTasksAdded, TelegramChecklistTasksDone, TelegramChosenInlineResult, TelegramCommunityChatAdded, TelegramCommunityChatJoined, TelegramCommunityChatRemoved, TelegramDirectMessagePriceChanged, TelegramDirectMessagesTopic, TelegramEphemeralMessageParameters, TelegramForceReply, TelegramForumTopicClosed, TelegramForumTopicReopened, TelegramGeneralForumTopicHidden, TelegramGeneralForumTopicUnhidden, TelegramGiftInfo, TelegramGiveawayCreated, TelegramInlineKeyboardMarkup, TelegramInlineQuery, TelegramInlineQueryResult, TelegramInlineQueryResultsButton, TelegramInputChecklist, TelegramInputFile, TelegramInputMedia, TelegramInputMediaAudio, TelegramInputMediaDocument, TelegramInputMediaLivePhoto, TelegramInputMediaPhoto, TelegramInputMediaVideo, TelegramInputPaidMedia, TelegramInputPollMedia, TelegramInputPollOption, TelegramInputRichMessage, TelegramLabeledPrice, TelegramLinkPreviewOptions, TelegramManagedBotCreated, TelegramManagedBotUpdated, TelegramMaybeInaccessibleMessage, TelegramMenuButton, TelegramMessage, TelegramMessageAutoDeleteTimerChanged, TelegramMessageEntity, TelegramMessageGenerationStopped, TelegramMessageOrigin, TelegramMessageReactionCountUpdated, TelegramMessageReactionUpdated, TelegramPaidMediaInfo, TelegramPaidMediaPurchased, TelegramPaidMessagePriceChanged, TelegramPoll, TelegramPollAnswer, TelegramPollOptionAdded, TelegramPollOptionDeleted, TelegramPreCheckoutQuery, TelegramReactionType, TelegramRefundedPayment, TelegramReplyKeyboardMarkup, TelegramReplyKeyboardRemove, TelegramReplyParameters, TelegramRichMessage, TelegramShippingOption, TelegramShippingQuery, TelegramSuggestedPostApprovalFailed, TelegramSuggestedPostApproved, TelegramSuggestedPostDeclined, TelegramSuggestedPostInfo, TelegramSuggestedPostPaid, TelegramSuggestedPostParameters, TelegramSuggestedPostRefunded, TelegramUniqueGiftInfo, TelegramVideoChatStarted } from "./types.js"; import type { DeleteMessageParams, EditMessageCaptionParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageTextParams, SetMessageReactionParams } from "./methods.js"; import type { ActionControllerLike, ActionControllerParams, TelegramLike } from "../telegram-like.js"; import type { Has } from "../util-types.js"; import type { Formattable } from "../formattable.js"; import type { RichLike } from "../rich-like.js"; import { Animation, Audio, Chat, ChatBoost, ChatInviteLink, ChatMember, ChatShared, Contact, Dice, Document, ExternalReplyInfo, ForumTopicCreated, ForumTopicEdited, Game, Giveaway, GiveawayCompleted, GiveawayWinners, InlineKeyboardMarkup, Invoice, LinkPreviewOptions, LivePhoto, Location, Message, MessageEntity, OrderInfo, PassportData, Poll, PollMedia, ProximityAlertTriggered, ShippingAddress, Sticker, Story, SuccessfulPayment, TextQuote, User, UsersShared, Venue, Video, VideoChatEnded, VideoChatParticipantsInvited, VideoChatScheduled, VideoNote, Voice, WebAppData, WriteAccessAllowed } from "./structures.js"; import { Photo, PollOptions, ReactionCounts, Reactions } from "../structures-handcrafted/index.js"; import { INSPECT } from "./inspect.js"; /** * thread-scoped shortcuts for `TelegramMessage` — every call auto-fills `message_thread_id`. returned by `update.thread` */ export declare class MessageThreadShortcuts { raw: TelegramMessage; readonly tg: TelegramLike; constructor(raw: TelegramMessage, tg: TelegramLike); /** * shortcut for `tg.api.closeForumTopic` */ closeForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.copyMessage` */ copy(from: number | string, params?: { direct_messages_topic_id?: number; video_start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.copyMessages` */ copyMany(from: number | string, messageIds: number[], params?: { direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; remove_caption?: boolean; }): Promise; /** * shortcut for `tg.api.deleteForumTopic` */ deleteForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.editForumTopic` */ editForumTopic(params?: { name?: string; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.forwardMessage` */ forward(from: number | string, params?: { direct_messages_topic_id?: number; video_start_timestamp?: number; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; }): Promise; /** * shortcut for `tg.api.forwardMessages` */ forwardMany(from: number | string, messageIds: number[], params?: { direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; }): Promise; /** * shortcut for `tg.api.reopenForumTopic` */ reopenForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.sendAnimation` */ sendAnimation(animation: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendAnimation` — sets `reply_parameters` to this message */ replyWithAnimation(animation: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendAudio` */ sendAudio(audio: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendAudio` — sets `reply_parameters` to this message */ replyWithAudio(audio: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendChatAction` */ sendChatAction(action: string, params?: {}): Promise; /** * shortcut for `tg.api.sendContact` */ sendContact(phoneNumber: string, firstName: string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendContact` — sets `reply_parameters` to this message */ replyWithContact(phoneNumber: string, firstName: string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDice` */ sendDice(params?: { direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendDice` — sets `reply_parameters` to this message */ replyWithDice(params?: { direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDocument` */ sendDocument(document: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendDocument` — sets `reply_parameters` to this message */ replyWithDocument(document: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendGame` */ sendGame(gameShortName: string, params?: { disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * reply shortcut for `tg.api.sendGame` — sets `reply_parameters` to this message */ replyWithGame(gameShortName: string, params?: { disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendInvoice` */ sendInvoice(params: { direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * reply shortcut for `tg.api.sendInvoice` — sets `reply_parameters` to this message */ replyWithInvoice(params: { direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendLivePhoto` */ sendLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendLivePhoto` — sets `reply_parameters` to this message */ replyWithLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendLocation` */ sendLocation(latitude: number, longitude: number, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendLocation` — sets `reply_parameters` to this message */ replyWithLocation(latitude: number, longitude: number, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMediaGroup` */ sendMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * reply shortcut for `tg.api.sendMediaGroup` — sets `reply_parameters` to this message */ replyWithMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * shortcut for `tg.api.sendMessage` */ send(text: string | Formattable, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendMessage` — sets `reply_parameters` to this message */ reply(text: string | Formattable, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendMessageDraft(draftId: number, text: string | Formattable, params?: { parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendPaidMedia` */ sendPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendPaidMedia` — sets `reply_parameters` to this message */ replyWithPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPhoto` */ sendPhoto(photo: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendPhoto` — sets `reply_parameters` to this message */ replyWithPhoto(photo: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPoll` */ sendPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendPoll` — sets `reply_parameters` to this message */ replyWithPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendRichMessage` — sets `reply_parameters` to this message */ replyWithRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichMessageDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendSticker` */ sendSticker(sticker: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendSticker` — sets `reply_parameters` to this message */ replyWithSticker(sticker: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVenue` */ sendVenue(latitude: number, longitude: number, title: string, address: string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendVenue` — sets `reply_parameters` to this message */ replyWithVenue(latitude: number, longitude: number, title: string, address: string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideo` */ sendVideo(video: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendVideo` — sets `reply_parameters` to this message */ replyWithVideo(video: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideoNote` */ sendVideoNote(videoNote: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendVideoNote` — sets `reply_parameters` to this message */ replyWithVideoNote(videoNote: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVoice` */ sendVoice(voice: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendVoice` — sets `reply_parameters` to this message */ replyWithVoice(voice: TelegramInputFile | string, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.unpinAllForumTopicMessages` */ unpinAllForumTopicMessages(params?: {}): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendDraft(draftId: number, text: string | Formattable, params?: { parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRich(richMessage: TelegramInputRichMessage | RichLike, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendRichMessage` — sets `reply_parameters` to this message */ replyWithRich(richMessage: TelegramInputRichMessage | RichLike, params?: { direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { can_stop?: boolean; keep_on_stop?: boolean; }): Promise; } /** * thread-scoped shortcuts for `TelegramMessageGenerationStopped` — every call auto-fills `message_thread_id`. returned by `update.thread` */ export declare class MessageGenerationStoppedThreadShortcuts { raw: TelegramMessageGenerationStopped; readonly tg: TelegramLike; constructor(raw: TelegramMessageGenerationStopped, tg: TelegramLike); /** * shortcut for `tg.api.closeForumTopic` */ closeForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.copyMessage` */ copy(from: number | string, messageId: number, params?: { direct_messages_topic_id?: number; video_start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.copyMessages` */ copyMany(from: number | string, messageIds: number[], params?: { direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; remove_caption?: boolean; }): Promise; /** * shortcut for `tg.api.deleteForumTopic` */ deleteForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.editForumTopic` */ editForumTopic(params?: { name?: string; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.forwardMessage` */ forward(from: number | string, messageId: number, params?: { direct_messages_topic_id?: number; video_start_timestamp?: number; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; }): Promise; /** * shortcut for `tg.api.forwardMessages` */ forwardMany(from: number | string, messageIds: number[], params?: { direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; }): Promise; /** * shortcut for `tg.api.reopenForumTopic` */ reopenForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.sendAnimation` */ sendAnimation(animation: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendAudio` */ sendAudio(audio: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendChatAction` */ sendChatAction(action: string, params?: { business_connection_id?: string; }): Promise; /** * shortcut for `tg.api.sendContact` */ sendContact(phoneNumber: string, firstName: string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDice` */ sendDice(params?: { business_connection_id?: string; direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDocument` */ sendDocument(document: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendGame` */ sendGame(gameShortName: string, params?: { business_connection_id?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendInvoice` */ sendInvoice(params: { direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendLivePhoto` */ sendLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendLocation` */ sendLocation(latitude: number, longitude: number, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMediaGroup` */ sendMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { business_connection_id?: string; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * shortcut for `tg.api.sendMessage` */ send(text: string | Formattable, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendMessageDraft(draftId: number, text: string | Formattable, params?: { parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendPaidMedia` */ sendPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { business_connection_id?: string; direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPhoto` */ sendPhoto(photo: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPoll` */ sendPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { business_connection_id?: string; question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichMessageDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendSticker` */ sendSticker(sticker: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVenue` */ sendVenue(latitude: number, longitude: number, title: string, address: string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideo` */ sendVideo(video: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideoNote` */ sendVideoNote(videoNote: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVoice` */ sendVoice(voice: TelegramInputFile | string, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.unpinAllForumTopicMessages` */ unpinAllForumTopicMessages(params?: {}): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendDraft(draftId: number, text: string | Formattable, params?: { parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRich(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { can_stop?: boolean; keep_on_stop?: boolean; }): Promise; } /** * shared base for every update built from `TelegramMessage` — implementation detail, not exported */ declare class MessageShared { raw: TelegramMessage; readonly tg: TelegramLike; readonly kind: string; private _from?; private _senderChat?; private _senderBusinessBot?; private _receiverUser?; private _chat?; private _replyToMessage?; private _externalReply?; private _quote?; private _replyToStory?; private _viaBot?; private _guestBotCallerUser?; private _guestBotCallerChat?; private _entities?; private _linkPreviewOptions?; private _animation?; private _audio?; private _document?; private _livePhoto?; private _photo?; private _sticker?; private _story?; private _video?; private _videoNote?; private _voice?; private _captionEntities?; private _contact?; private _dice?; private _game?; private _poll?; private _venue?; private _location?; private _newChatMembers?; private _leftChatMember?; private _newChatPhoto?; private _invoice?; private _successfulPayment?; private _usersShared?; private _chatShared?; private _writeAccessAllowed?; private _passportData?; private _proximityAlertTriggered?; private _forumTopicCreated?; private _forumTopicEdited?; private _giveaway?; private _giveawayWinners?; private _giveawayCompleted?; private _videoChatScheduled?; private _videoChatEnded?; private _videoChatParticipantsInvited?; private _webAppData?; private _replyMarkup?; constructor(raw: TelegramMessage, tg: TelegramLike); /** * Unique message identifier inside this chat; 0 for ephemeral messages. In specific instances (e.g., a message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent. */ get id(): number; /** * Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only */ get messageThreadId(): number | undefined; /** * Optional. Information about the direct messages chat topic that contains the message */ get directMessagesTopic(): TelegramDirectMessagesTopic | undefined; /** * Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats. */ get from(): User | undefined; /** * Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats. */ get senderChat(): Chat | undefined; /** * Optional. If the sender of the message boosted the chat, the number of boosts added by the user */ get senderBoostCount(): number | undefined; /** * Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account. */ get senderBusinessBot(): User | undefined; /** * Optional. Tag or custom title of the sender of the message; for supergroups only */ get senderTag(): string | undefined; /** * Optional. For ephemeral messages, the user who received the message */ get receiverUser(): User | undefined; /** * Optional. For ephemeral messages, identifier of the ephemeral message inside this chat. The identifier may be reused for another ephemeral message after the message is deleted or expires. */ get ephemeralMessageId(): number | undefined; /** * Date the message was sent in Unix time. It is always a positive number, representing a valid date. */ get date(): number; /** * Optional. The unique identifier for the guest query. Use this identifier with the method answerGuestQuery to send a response message. If non-empty, the message belongs to the chat where the guest bot was summoned, which may not coincide with other existing bot chats sharing the same identifier. */ get guestQueryId(): string | undefined; /** * Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier. */ get businessConnectionId(): string | undefined; /** * Chat the message belongs to */ get chat(): Chat; /** * Optional. Information about the original message for forwarded messages */ get forwardOrigin(): TelegramMessageOrigin | undefined; /** * Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot */ get isTopicMessage(): true | undefined; /** * Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group */ get isAutomaticForward(): true | undefined; /** * Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. If the message is a reply to an ephemeral message, then this field may be omitted. */ get replyToMessage(): Message | undefined; /** * Optional. Information about the message that is being replied to, which may come from another chat or forum topic */ get externalReply(): ExternalReplyInfo | undefined; /** * Optional. For replies that quote part of the original message, the quoted part of the message */ get quote(): TextQuote | undefined; /** * Optional. For replies to a story, the original story */ get replyToStory(): Story | undefined; /** * Optional. Identifier of the specific checklist task that is being replied to */ get replyToChecklistTaskId(): number | undefined; /** * Optional. Persistent identifier of the specific poll option that is being replied to */ get replyToPollOptionId(): string | undefined; /** * Optional. Bot through which the message was sent */ get viaBot(): User | undefined; /** * Optional. For a message sent by a guest bot, this is the user whose original message triggered the bot's response */ get guestBotCallerUser(): User | undefined; /** * Optional. For a message sent by a guest bot, this is the chat whose original message triggered the bot's response */ get guestBotCallerChat(): Chat | undefined; /** * Optional. Date the message was last edited in Unix time */ get editDate(): number | undefined; /** * Optional. True, if the message can't be forwarded */ get hasProtectedContent(): true | undefined; /** * Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message */ get isFromOffline(): true | undefined; /** * Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited. */ get isPaidPost(): true | undefined; /** * Optional. The unique identifier inside this chat of a media message group this message belongs to */ get mediaGroupId(): string | undefined; /** * Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */ get authorSignature(): string | undefined; /** * Optional. The number of Telegram Stars that were paid by the sender of the message to send it */ get paidStarCount(): number | undefined; /** * Optional. For text messages, the actual UTF-8 text of the message */ get text(): string | undefined; /** * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */ get entities(): MessageEntity[] | undefined; /** * Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed */ get linkPreviewOptions(): LinkPreviewOptions | undefined; /** * Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited. */ get suggestedPostInfo(): TelegramSuggestedPostInfo | undefined; /** * Optional. Unique identifier of the message effect added to the message */ get effectId(): string | undefined; /** * Optional. Message is a rich formatted message */ get richMessage(): TelegramRichMessage | undefined; /** * Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set. */ get animation(): Animation | undefined; /** * Optional. Message is an audio file, information about the file */ get audio(): Audio | undefined; /** * Optional. Message is a general file, information about the file */ get document(): Document | undefined; /** * Optional. Message is a live photo, information about the live photo. For backward compatibility, when this field is set, the photo field will also be set. */ get livePhoto(): LivePhoto | undefined; /** * Optional. Message contains paid media; information about the paid media */ get paidMedia(): TelegramPaidMediaInfo | undefined; /** * Optional. Message is a photo, available sizes of the photo */ get photo(): Photo | undefined; /** * Optional. Message is a sticker, information about the sticker */ get sticker(): Sticker | undefined; /** * Optional. Message is a forwarded story */ get story(): Story | undefined; /** * Optional. Message is a video, information about the video */ get video(): Video | undefined; /** * Optional. Message is a video note, information about the video message */ get videoNote(): VideoNote | undefined; /** * Optional. Message is a voice message, information about the file */ get voice(): Voice | undefined; /** * Optional. Caption for the animation, audio, document, paid media, photo, video or voice */ get caption(): string | undefined; /** * Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */ get captionEntities(): MessageEntity[] | undefined; /** * Optional. True, if the caption must be shown above the message media */ get showCaptionAboveMedia(): true | undefined; /** * Optional. True, if the message media is covered by a spoiler animation */ get hasMediaSpoiler(): true | undefined; /** * Optional. Message is a checklist */ get checklist(): TelegramChecklist | undefined; /** * Optional. Message is a shared contact, information about the contact */ get contact(): Contact | undefined; /** * Optional. Message is a dice with random value */ get dice(): Dice | undefined; /** * Optional. Message is a game, information about the game. More about games » */ get game(): Game | undefined; /** * Optional. Message is a native poll, information about the poll */ get poll(): Poll | undefined; /** * Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set. */ get venue(): Venue | undefined; /** * Optional. Message is a shared location, information about the location */ get location(): Location | undefined; /** * Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */ get newChatMembers(): User[] | undefined; /** * Optional. A member was removed from the group, information about them (this member may be the bot itself) */ get leftChatMember(): User | undefined; /** * Optional. Service message: chat owner has left */ get chatOwnerLeft(): TelegramChatOwnerLeft | undefined; /** * Optional. Service message: chat owner has changed */ get chatOwnerChanged(): TelegramChatOwnerChanged | undefined; /** * Optional. A chat title was changed to this value */ get newChatTitle(): string | undefined; /** * Optional. A chat photo was change to this value */ get newChatPhoto(): Photo | undefined; /** * Optional. Service message: the group has been created */ get groupChatCreated(): true | undefined; /** * Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */ get supergroupChatCreated(): true | undefined; /** * Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */ get channelChatCreated(): true | undefined; /** * Optional. Service message: auto-delete timer settings changed in the chat */ get messageAutoDeleteTimerChanged(): TelegramMessageAutoDeleteTimerChanged | undefined; /** * Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */ get migrateToChatId(): number | undefined; /** * Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */ get migrateFromChatId(): number | undefined; /** * Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */ get pinnedMessage(): TelegramMaybeInaccessibleMessage | undefined; /** * Optional. Message is an invoice for a payment, information about the invoice. More about payments » */ get invoice(): Invoice | undefined; /** * Optional. Message is a service message about a successful payment, information about the payment. More about payments » */ get successfulPayment(): SuccessfulPayment | undefined; /** * Optional. Message is a service message about a refunded payment, information about the payment. More about payments » */ get refundedPayment(): TelegramRefundedPayment | undefined; /** * Optional. Service message: users were shared with the bot */ get usersShared(): UsersShared | undefined; /** * Optional. Service message: a chat was shared with the bot */ get chatShared(): ChatShared | undefined; /** * Optional. Service message: a regular gift was sent or received */ get gift(): TelegramGiftInfo | undefined; /** * Optional. Service message: a unique gift was sent or received */ get uniqueGift(): TelegramUniqueGiftInfo | undefined; /** * Optional. Service message: upgrade of a gift was purchased after the gift was sent */ get giftUpgradeSent(): TelegramGiftInfo | undefined; /** * Optional. The domain name of the website on which the user has logged in. More about Telegram Login » */ get connectedWebsite(): string | undefined; /** * Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess */ get writeAccessAllowed(): WriteAccessAllowed | undefined; /** * Optional. Telegram Passport data */ get passportData(): PassportData | undefined; /** * Optional. Service message: a user in the chat triggered another user's proximity alert while sharing Live Location */ get proximityAlertTriggered(): ProximityAlertTriggered | undefined; /** * Optional. Service message: user boosted the chat */ get boostAdded(): TelegramChatBoostAdded | undefined; /** * Optional. Service message: chat background set */ get chatBackgroundSet(): TelegramChatBackground | undefined; /** * Optional. Service message: some tasks in a checklist were marked as done or not done */ get checklistTasksDone(): TelegramChecklistTasksDone | undefined; /** * Optional. Service message: tasks were added to a checklist */ get checklistTasksAdded(): TelegramChecklistTasksAdded | undefined; /** * Optional. Service message: chat or bot added to a Community */ get communityChatAdded(): TelegramCommunityChatAdded | undefined; /** * Optional. Service message: chat was joined by a user from a Community */ get communityChatJoined(): TelegramCommunityChatJoined | undefined; /** * Optional. Service message: chat or bot removed from a Community */ get communityChatRemoved(): TelegramCommunityChatRemoved | undefined; /** * Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed */ get directMessagePriceChanged(): TelegramDirectMessagePriceChanged | undefined; /** * Optional. Service message: forum topic created */ get forumTopicCreated(): ForumTopicCreated | undefined; /** * Optional. Service message: forum topic edited */ get forumTopicEdited(): ForumTopicEdited | undefined; /** * Optional. Service message: forum topic closed */ get forumTopicClosed(): TelegramForumTopicClosed | undefined; /** * Optional. Service message: forum topic reopened */ get forumTopicReopened(): TelegramForumTopicReopened | undefined; /** * Optional. Service message: the 'General' forum topic hidden */ get generalForumTopicHidden(): TelegramGeneralForumTopicHidden | undefined; /** * Optional. Service message: the 'General' forum topic unhidden */ get generalForumTopicUnhidden(): TelegramGeneralForumTopicUnhidden | undefined; /** * Optional. Service message: a scheduled giveaway was created */ get giveawayCreated(): TelegramGiveawayCreated | undefined; /** * Optional. The message is a scheduled giveaway message */ get giveaway(): Giveaway | undefined; /** * Optional. A giveaway with public winners was completed */ get giveawayWinners(): GiveawayWinners | undefined; /** * Optional. Service message: a giveaway without public winners was completed */ get giveawayCompleted(): GiveawayCompleted | undefined; /** * Optional. Service message: user created a bot that will be managed by the current bot */ get managedBotCreated(): TelegramManagedBotCreated | undefined; /** * Optional. Service message: the price for paid messages has changed in the chat */ get paidMessagePriceChanged(): TelegramPaidMessagePriceChanged | undefined; /** * Optional. Service message: answer option was added to a poll */ get pollOptionAdded(): TelegramPollOptionAdded | undefined; /** * Optional. Service message: answer option was deleted from a poll */ get pollOptionDeleted(): TelegramPollOptionDeleted | undefined; /** * Optional. Service message: a suggested post was approved */ get suggestedPostApproved(): TelegramSuggestedPostApproved | undefined; /** * Optional. Service message: approval of a suggested post has failed */ get suggestedPostApprovalFailed(): TelegramSuggestedPostApprovalFailed | undefined; /** * Optional. Service message: a suggested post was declined */ get suggestedPostDeclined(): TelegramSuggestedPostDeclined | undefined; /** * Optional. Service message: payment for a suggested post was received */ get suggestedPostPaid(): TelegramSuggestedPostPaid | undefined; /** * Optional. Service message: payment for a suggested post was refunded */ get suggestedPostRefunded(): TelegramSuggestedPostRefunded | undefined; /** * Optional. Service message: video chat scheduled */ get videoChatScheduled(): VideoChatScheduled | undefined; /** * Optional. Service message: video chat started */ get videoChatStarted(): TelegramVideoChatStarted | undefined; /** * Optional. Service message: video chat ended */ get videoChatEnded(): VideoChatEnded | undefined; /** * Optional. Service message: new participants invited to a video chat */ get videoChatParticipantsInvited(): VideoChatParticipantsInvited | undefined; /** * Optional. Service message: data sent by a Web App */ get webAppData(): WebAppData | undefined; /** * Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */ get replyMarkup(): InlineKeyboardMarkup | undefined; /** * true if `message_thread_id` is set */ hasMessageThreadId(): this is this & { messageThreadId: number; thread: MessageThreadShortcuts; }; /** * true if `direct_messages_topic` is set */ hasDirectMessagesTopic(): this is this & { directMessagesTopic: TelegramDirectMessagesTopic; }; /** * true if `from` is set */ hasFrom(): this is this & { from: User; }; /** * true if `sender_chat` is set */ hasSenderChat(): this is this & { senderChat: Chat; }; /** * true if `sender_boost_count` is set */ hasSenderBoostCount(): this is this & { senderBoostCount: number; }; /** * true if `sender_business_bot` is set */ hasSenderBusinessBot(): this is this & { senderBusinessBot: User; }; /** * true if `sender_tag` is set */ hasSenderTag(): this is this & { senderTag: string; }; /** * true if `receiver_user` is set */ hasReceiverUser(): this is this & { receiverUser: User; }; /** * true if `ephemeral_message_id` is set */ hasEphemeralMessageId(): this is this & { ephemeralMessageId: number; }; /** * true if `guest_query_id` is set */ hasGuestQueryId(): this is this & { guestQueryId: string; }; /** * true if `business_connection_id` is set */ hasBusinessConnectionId(): this is this & { businessConnectionId: string; }; /** * true if `forward_origin` is set */ hasForwardOrigin(): this is this & { forwardOrigin: TelegramMessageOrigin; }; /** * true if `external_reply` is set */ hasExternalReply(): this is this & { externalReply: ExternalReplyInfo; }; /** * true if `quote` is set */ hasQuote(): this is this & { quote: TextQuote; }; /** * true if `reply_to_story` is set */ hasReplyToStory(): this is this & { replyToStory: Story; }; /** * true if `reply_to_checklist_task_id` is set */ hasReplyToChecklistTaskId(): this is this & { replyToChecklistTaskId: number; }; /** * true if `reply_to_poll_option_id` is set */ hasReplyToPollOptionId(): this is this & { replyToPollOptionId: string; }; /** * true if `via_bot` is set */ hasViaBot(): this is this & { viaBot: User; }; /** * true if `guest_bot_caller_user` is set */ hasGuestBotCallerUser(): this is this & { guestBotCallerUser: User; }; /** * true if `guest_bot_caller_chat` is set */ hasGuestBotCallerChat(): this is this & { guestBotCallerChat: Chat; }; /** * true if `edit_date` is set */ hasEditDate(): this is this & { editDate: number; }; /** * true if `media_group_id` is set */ hasMediaGroupId(): this is this & { mediaGroupId: string; }; /** * true if `author_signature` is set */ hasAuthorSignature(): this is this & { authorSignature: string; }; /** * true if `paid_star_count` is set */ hasPaidStarCount(): this is this & { paidStarCount: number; }; /** * true if `text` is set */ hasText(): this is this & { text: string; }; /** * true if `entities` has at least one item */ hasEntities(): this is this & { entities: MessageEntity[]; }; /** * true if `link_preview_options` is set */ hasLinkPreviewOptions(): this is this & { linkPreviewOptions: LinkPreviewOptions; }; /** * true if `suggested_post_info` is set */ hasSuggestedPostInfo(): this is this & { suggestedPostInfo: TelegramSuggestedPostInfo; }; /** * true if `effect_id` is set */ hasEffectId(): this is this & { effectId: string; }; /** * true if `rich_message` is set */ hasRichMessage(): this is this & { richMessage: TelegramRichMessage; }; /** * true if `animation` is set */ hasAnimation(): this is this & { animation: Animation; }; /** * true if `audio` is set */ hasAudio(): this is this & { audio: Audio; }; /** * true if `document` is set */ hasDocument(): this is this & { document: Document; }; /** * true if `live_photo` is set */ hasLivePhoto(): this is this & { livePhoto: LivePhoto; }; /** * true if `paid_media` is set */ hasPaidMedia(): this is this & { paidMedia: TelegramPaidMediaInfo; }; /** * true if `photo` has at least one item */ hasPhoto(): this is this & { photo: Photo; }; /** * true if `sticker` is set */ hasSticker(): this is this & { sticker: Sticker; }; /** * true if `story` is set */ hasStory(): this is this & { story: Story; }; /** * true if `video` is set */ hasVideo(): this is this & { video: Video; }; /** * true if `video_note` is set */ hasVideoNote(): this is this & { videoNote: VideoNote; }; /** * true if `voice` is set */ hasVoice(): this is this & { voice: Voice; }; /** * true if `caption` is set */ hasCaption(): this is this & { caption: string; }; /** * true if `caption_entities` has at least one item */ hasCaptionEntities(): this is this & { captionEntities: MessageEntity[]; }; /** * true if `show_caption_above_media` is set */ hasShowCaptionAboveMedia(): this is this & { showCaptionAboveMedia: true; }; /** * true if `checklist` is set */ hasChecklist(): this is this & { checklist: TelegramChecklist; }; /** * true if `contact` is set */ hasContact(): this is this & { contact: Contact; }; /** * true if `dice` is set */ hasDice(): this is this & { dice: Dice; }; /** * true if `game` is set */ hasGame(): this is this & { game: Game; }; /** * true if `poll` is set */ hasPoll(): this is this & { poll: Poll; }; /** * true if `venue` is set */ hasVenue(): this is this & { venue: Venue; }; /** * true if `location` is set */ hasLocation(): this is this & { location: Location; }; /** * true if `new_chat_members` has at least one item */ hasNewChatMembers(): this is this & { newChatMembers: User[]; }; /** * true if `left_chat_member` is set */ hasLeftChatMember(): this is this & { leftChatMember: User; }; /** * true if `chat_owner_left` is set */ hasChatOwnerLeft(): this is this & { chatOwnerLeft: TelegramChatOwnerLeft; }; /** * true if `chat_owner_changed` is set */ hasChatOwnerChanged(): this is this & { chatOwnerChanged: TelegramChatOwnerChanged; }; /** * true if `new_chat_title` is set */ hasNewChatTitle(): this is this & { newChatTitle: string; }; /** * true if `new_chat_photo` has at least one item */ hasNewChatPhoto(): this is this & { newChatPhoto: Photo; }; /** * true if `delete_chat_photo` is set */ hasDeleteChatPhoto(): this is this & { deleteChatPhoto: true; }; /** * true if `group_chat_created` is set */ hasGroupChatCreated(): this is this & { groupChatCreated: true; }; /** * true if `supergroup_chat_created` is set */ hasSupergroupChatCreated(): this is this & { supergroupChatCreated: true; }; /** * true if `channel_chat_created` is set */ hasChannelChatCreated(): this is this & { channelChatCreated: true; }; /** * true if `message_auto_delete_timer_changed` is set */ hasMessageAutoDeleteTimerChanged(): this is this & { messageAutoDeleteTimerChanged: TelegramMessageAutoDeleteTimerChanged; }; /** * true if `migrate_to_chat_id` is set */ hasMigrateToChatId(): this is this & { migrateToChatId: number; }; /** * true if `migrate_from_chat_id` is set */ hasMigrateFromChatId(): this is this & { migrateFromChatId: number; }; /** * true if `pinned_message` is set */ hasPinnedMessage(): this is this & { pinnedMessage: TelegramMaybeInaccessibleMessage; }; /** * true if `invoice` is set */ hasInvoice(): this is this & { invoice: Invoice; }; /** * true if `successful_payment` is set */ hasSuccessfulPayment(): this is this & { successfulPayment: SuccessfulPayment; }; /** * true if `refunded_payment` is set */ hasRefundedPayment(): this is this & { refundedPayment: TelegramRefundedPayment; }; /** * true if `users_shared` is set */ hasUsersShared(): this is this & { usersShared: UsersShared; }; /** * true if `chat_shared` is set */ hasChatShared(): this is this & { chatShared: ChatShared; }; /** * true if `gift` is set */ hasGift(): this is this & { gift: TelegramGiftInfo; }; /** * true if `unique_gift` is set */ hasUniqueGift(): this is this & { uniqueGift: TelegramUniqueGiftInfo; }; /** * true if `gift_upgrade_sent` is set */ hasGiftUpgradeSent(): this is this & { giftUpgradeSent: TelegramGiftInfo; }; /** * true if `connected_website` is set */ hasConnectedWebsite(): this is this & { connectedWebsite: string; }; /** * true if `write_access_allowed` is set */ hasWriteAccessAllowed(): this is this & { writeAccessAllowed: WriteAccessAllowed; }; /** * true if `passport_data` is set */ hasPassportData(): this is this & { passportData: PassportData; }; /** * true if `proximity_alert_triggered` is set */ hasProximityAlertTriggered(): this is this & { proximityAlertTriggered: ProximityAlertTriggered; }; /** * true if `boost_added` is set */ hasBoostAdded(): this is this & { boostAdded: TelegramChatBoostAdded; }; /** * true if `chat_background_set` is set */ hasChatBackgroundSet(): this is this & { chatBackgroundSet: TelegramChatBackground; }; /** * true if `checklist_tasks_done` is set */ hasChecklistTasksDone(): this is this & { checklistTasksDone: TelegramChecklistTasksDone; }; /** * true if `checklist_tasks_added` is set */ hasChecklistTasksAdded(): this is this & { checklistTasksAdded: TelegramChecklistTasksAdded; }; /** * true if `community_chat_added` is set */ hasCommunityChatAdded(): this is this & { communityChatAdded: TelegramCommunityChatAdded; }; /** * true if `community_chat_joined` is set */ hasCommunityChatJoined(): this is this & { communityChatJoined: TelegramCommunityChatJoined; }; /** * true if `community_chat_removed` is set */ hasCommunityChatRemoved(): this is this & { communityChatRemoved: TelegramCommunityChatRemoved; }; /** * true if `direct_message_price_changed` is set */ hasDirectMessagePriceChanged(): this is this & { directMessagePriceChanged: TelegramDirectMessagePriceChanged; }; /** * true if `forum_topic_created` is set */ hasForumTopicCreated(): this is this & { forumTopicCreated: ForumTopicCreated; }; /** * true if `forum_topic_edited` is set */ hasForumTopicEdited(): this is this & { forumTopicEdited: ForumTopicEdited; }; /** * true if `forum_topic_closed` is set */ hasForumTopicClosed(): this is this & { forumTopicClosed: TelegramForumTopicClosed; }; /** * true if `forum_topic_reopened` is set */ hasForumTopicReopened(): this is this & { forumTopicReopened: TelegramForumTopicReopened; }; /** * true if `general_forum_topic_hidden` is set */ hasGeneralForumTopicHidden(): this is this & { generalForumTopicHidden: TelegramGeneralForumTopicHidden; }; /** * true if `general_forum_topic_unhidden` is set */ hasGeneralForumTopicUnhidden(): this is this & { generalForumTopicUnhidden: TelegramGeneralForumTopicUnhidden; }; /** * true if `giveaway_created` is set */ hasGiveawayCreated(): this is this & { giveawayCreated: TelegramGiveawayCreated; }; /** * true if `giveaway` is set */ hasGiveaway(): this is this & { giveaway: Giveaway; }; /** * true if `giveaway_winners` is set */ hasGiveawayWinners(): this is this & { giveawayWinners: GiveawayWinners; }; /** * true if `giveaway_completed` is set */ hasGiveawayCompleted(): this is this & { giveawayCompleted: GiveawayCompleted; }; /** * true if `managed_bot_created` is set */ hasManagedBotCreated(): this is this & { managedBotCreated: TelegramManagedBotCreated; }; /** * true if `paid_message_price_changed` is set */ hasPaidMessagePriceChanged(): this is this & { paidMessagePriceChanged: TelegramPaidMessagePriceChanged; }; /** * true if `poll_option_added` is set */ hasPollOptionAdded(): this is this & { pollOptionAdded: TelegramPollOptionAdded; }; /** * true if `poll_option_deleted` is set */ hasPollOptionDeleted(): this is this & { pollOptionDeleted: TelegramPollOptionDeleted; }; /** * true if `suggested_post_approved` is set */ hasSuggestedPostApproved(): this is this & { suggestedPostApproved: TelegramSuggestedPostApproved; }; /** * true if `suggested_post_approval_failed` is set */ hasSuggestedPostApprovalFailed(): this is this & { suggestedPostApprovalFailed: TelegramSuggestedPostApprovalFailed; }; /** * true if `suggested_post_declined` is set */ hasSuggestedPostDeclined(): this is this & { suggestedPostDeclined: TelegramSuggestedPostDeclined; }; /** * true if `suggested_post_paid` is set */ hasSuggestedPostPaid(): this is this & { suggestedPostPaid: TelegramSuggestedPostPaid; }; /** * true if `suggested_post_refunded` is set */ hasSuggestedPostRefunded(): this is this & { suggestedPostRefunded: TelegramSuggestedPostRefunded; }; /** * true if `video_chat_scheduled` is set */ hasVideoChatScheduled(): this is this & { videoChatScheduled: VideoChatScheduled; }; /** * true if `video_chat_started` is set */ hasVideoChatStarted(): this is this & { videoChatStarted: TelegramVideoChatStarted; }; /** * true if `video_chat_ended` is set */ hasVideoChatEnded(): this is this & { videoChatEnded: VideoChatEnded; }; /** * true if `video_chat_participants_invited` is set */ hasVideoChatParticipantsInvited(): this is this & { videoChatParticipantsInvited: VideoChatParticipantsInvited; }; /** * true if `web_app_data` is set */ hasWebAppData(): this is this & { webAppData: WebAppData; }; /** * true if `reply_markup` is set */ hasReplyMarkup(): this is this & { replyMarkup: InlineKeyboardMarkup; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `chat.id` */ get chatId(): number; /** * best-effort sender id: `from.id` → `sender_chat.id` → `chat.id` */ get senderId(): number; /** * shortcut for `reply_to_message?.message_id` */ get replyToMessageId(): number | undefined; /** * deep-link payload after `/start` (`t.me/?start=`) — grounded in the `bot_command` entity telegram parsed, so text that merely looks like a command never matches, and a `/start@other_bot` addressed to a different bot yields `undefined` (mentions are checked against `tg.bot.username`). `undefined` when this is not a `/start` command or no payload was sent. see also `filters.start` (regex-based and mention-agnostic by design) */ get startPayload(): string | undefined; /** * true if this message has `reply_to_message` */ hasReplyToMessage(): this is Has; /** * true if this message is a `/start` command carrying a deep-link payload */ hasStartPayload(): this is Has; /** * true if any `entities` item has the given `type` */ hasEntitiesOf(type: string): boolean; /** * true if any `caption_entities` item has the given `type` */ hasCaptionEntitiesOf(type: string): boolean; /** * alias for `hasForwardOrigin()` */ isForwarded(): this is Has; /** * true if this message is a reply */ isReply(): this is Has; /** * true if this message is ephemeral (visible only to one user and the bot). sends/replies from an ephemeral context auto-fill the ephemeral params — pass `ephemeral: false` to send a regular message instead */ isEphemeral(): this is Has; /** * true if this message is part of a media group (album). use `await update.collectMediaGroup()` from `@puregram/flow` to fetch the full album */ isMediaGroup(): boolean; /** * true if `chat.type === "private"` */ isPrivate(): boolean; /** * true if `chat.type === "group"` (strict — supergroups excluded) */ isGroup(): boolean; /** * true if `chat.type === "supergroup"` */ isSupergroup(): boolean; /** * true if `chat.type === "channel"` */ isChannel(): boolean; /** * download the message attachment as a `Buffer`. returns `null` if the message has no media. auto-picks with priority `document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker` */ download(): Promise; /** * download the message attachment as a node `Readable`. returns `null` if no media */ downloadStream(): Promise; /** * download the message attachment as an async-iterable byte stream. returns `null` if no media */ downloadIterable(): Promise | null>; /** * download the message attachment to disk. returns `null` if no media; otherwise resolves once the file is fully written */ downloadToFile(path: string): Promise; /** * create a controller that re-sends `sendChatAction(action)` every `interval` ms (default 5000) until `stop()` is called — telegram clears the action after ~5 seconds, so a long task needs it refreshed */ createActionController(action: ActionControllerLike["action"], options?: ActionControllerParams): ActionControllerLike; /** * run `fn` while continuously sending `sendChatAction(action)`. the action auto-stops when `fn` settles — even if it throws — and `fn`'s result is returned */ withChatAction(action: ActionControllerLike["action"], fn: () => Promise | T, options?: ActionControllerParams): Promise; /** * react to this message — an emoji string for the common case, or a reaction array for custom / multiple */ react(reaction: string | TelegramReactionType[], params?: Omit): Promise; /** * edit this message to rich content (build it with @puregram/rich) */ editRich(richMessage: TelegramInputRichMessage | RichLike, params?: Omit): Promise; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.approveChatJoinRequest` */ approveChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.approveSuggestedPost` */ approveSuggestedPost(params?: { send_date?: number; }): Promise; /** * shortcut for `tg.api.banChatMember` */ banChatMember(user: number, params?: { until_date?: number; revoke_messages?: boolean; }): Promise; /** * shortcut for `tg.api.banChatSenderChat` */ banChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.closeForumTopic` */ closeForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.closeGeneralForumTopic` */ closeGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.copyMessage` */ copy(from: number | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.copyMessages` */ copyMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; remove_caption?: boolean; }): Promise; /** * shortcut for `tg.api.createChatInviteLink` */ createChatInviteLink(params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.createChatSubscriptionInviteLink` */ createChatSubscriptionInviteLink(subscriptionPeriod: number, subscriptionPrice: number, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.createForumTopic` */ createForumTopic(name: string, params?: { icon_color?: number; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.declineChatJoinRequest` */ declineChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.declineSuggestedPost` */ declineSuggestedPost(params?: { comment?: string; }): Promise; /** * shortcut for `tg.api.deleteAllMessageReactions` */ deleteAllMessageReactions(params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteChatPhoto` */ deleteChatPhoto(params?: {}): Promise; /** * shortcut for `tg.api.deleteChatStickerSet` */ deleteChatStickerSet(params?: {}): Promise; /** * shortcut for `tg.api.deleteEphemeralMessage` */ deleteEphemeralMessage(params: { receiver_user_id: number; ephemeral_message_id: number; }): Promise; /** * shortcut for `tg.api.deleteForumTopic` */ deleteForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.deleteMessage` — routes to `tg.api.deleteEphemeralMessage` when this message is ephemeral */ delete(params?: {}): Promise; /** * shortcut for `tg.api.deleteMessageReaction` */ deleteMessageReaction(params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteMessages` */ deleteMany(messageIds: number[], params?: {}): Promise; /** * shortcut for `tg.api.editChatInviteLink` */ editChatInviteLink(inviteLink: string, params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.editChatSubscriptionInviteLink` */ editChatSubscriptionInviteLink(inviteLink: string, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageCaption` */ editEphemeralMessageCaption(params: { receiver_user_id: number; ephemeral_message_id: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageMedia` */ editEphemeralMessageMedia(params: { receiver_user_id: number; ephemeral_message_id: number; media: TelegramInputMedia; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageReplyMarkup` */ editEphemeralMessageReplyMarkup(params: { receiver_user_id: number; ephemeral_message_id: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageText` */ editEphemeralMessageText(params: { receiver_user_id: number; ephemeral_message_id: number; text?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; rich_message?: TelegramInputRichMessage; link_preview_options?: TelegramLinkPreviewOptions; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editForumTopic` */ editForumTopic(threadId: number, params?: { name?: string; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.editGeneralForumTopic` */ editGeneralForumTopic(name: string, params?: {}): Promise; /** * shortcut for `tg.api.editMessageCaption` — routes to `tg.api.editEphemeralMessageCaption` when this message is ephemeral */ editCaption(params?: { inline_message_id?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise | Promise; /** * shortcut for `tg.api.editMessageChecklist` */ editMessageChecklist(checklist: TelegramInputChecklist, params?: { reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageLiveLocation` */ editLiveLocation(latitude: number, longitude: number, params?: { inline_message_id?: string; live_period?: number; horizontal_accuracy?: number; heading?: number; proximity_alert_radius?: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageMedia` — routes to `tg.api.editEphemeralMessageMedia` when this message is ephemeral */ editMedia(media: TelegramInputMedia, params?: { inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise | Promise; /** * shortcut for `tg.api.editMessageReplyMarkup` — routes to `tg.api.editEphemeralMessageReplyMarkup` when this message is ephemeral */ editReplyMarkup(params?: { inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise | Promise; /** * shortcut for `tg.api.editMessageText` — routes to `tg.api.editEphemeralMessageText` when this message is ephemeral */ edit(text: string | Formattable, params?: { inline_message_id?: string; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; rich_message?: TelegramInputRichMessage; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise | Promise; /** * shortcut for `tg.api.exportChatInviteLink` */ exportChatInviteLink(params?: {}): Promise; /** * shortcut for `tg.api.forwardMessage` */ forward(from: number | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; }): Promise; /** * shortcut for `tg.api.forwardMessages` */ forwardMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; }): Promise; /** * shortcut for `tg.api.getChat` */ getChat(params?: {}): Promise; /** * shortcut for `tg.api.getChatAdministrators` */ getChatAdministrators(params?: { return_bots?: boolean; }): Promise<(import("./types.js").TelegramChatMemberOwner | import("./types.js").TelegramChatMemberAdministrator)[]>; /** * shortcut for `tg.api.getChatGifts` */ getChatGifts(params?: { exclude_unsaved?: boolean; exclude_saved?: boolean; exclude_unlimited?: boolean; exclude_limited_upgradable?: boolean; exclude_limited_non_upgradable?: boolean; exclude_from_blockchain?: boolean; exclude_unique?: boolean; sort_by_price?: boolean; offset?: string; limit?: number; }): Promise; /** * shortcut for `tg.api.getChatMember` */ getChatMember(user: number, params?: {}): Promise; /** * shortcut for `tg.api.getChatMemberCount` */ getChatMemberCount(params?: {}): Promise; /** * shortcut for `tg.api.getChatMenuButton` */ getChatMenuButton(params?: {}): Promise; /** * shortcut for `tg.api.getGameHighScores` */ getGameHighScores(user: number, params?: { inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.getUserChatBoosts` */ getUserChatBoosts(user: number, params?: {}): Promise; /** * shortcut for `tg.api.hideGeneralForumTopic` */ hideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.leaveChat` */ leaveChat(params?: {}): Promise; /** * shortcut for `tg.api.pinChatMessage` */ pin(params?: { disable_notification?: boolean; }): Promise; /** * shortcut for `tg.api.promoteChatMember` */ promoteChatMember(user: number, params?: { is_anonymous?: boolean; can_manage_chat?: boolean; can_delete_messages?: boolean; can_manage_video_chats?: boolean; can_restrict_members?: boolean; can_promote_members?: boolean; can_change_info?: boolean; can_invite_users?: boolean; can_post_stories?: boolean; can_edit_stories?: boolean; can_delete_stories?: boolean; can_post_messages?: boolean; can_edit_messages?: boolean; can_pin_messages?: boolean; can_manage_topics?: boolean; can_manage_direct_messages?: boolean; can_manage_tags?: boolean; can_send_welcome_messages?: boolean; }): Promise; /** * shortcut for `tg.api.readBusinessMessage` */ readBusinessMessage(params?: {}): Promise; /** * shortcut for `tg.api.removeChatVerification` */ removeChatVerification(params?: {}): Promise; /** * shortcut for `tg.api.reopenForumTopic` */ reopenForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.reopenGeneralForumTopic` */ reopenGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.restrictChatMember` */ restrictChatMember(user: number, permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; until_date?: number; }): Promise; /** * shortcut for `tg.api.revokeChatInviteLink` */ revokeChatInviteLink(inviteLink: string, params?: {}): Promise; /** * shortcut for `tg.api.sendAnimation` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendAnimation(animation: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendAnimation` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithAnimation(animation: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendAudio` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendAudio(audio: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendAudio` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithAudio(audio: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendChatAction` */ sendChatAction(action: string, params?: { message_thread_id?: number; }): Promise; /** * shortcut for `tg.api.sendChecklist` */ sendChecklist(checklist: TelegramInputChecklist, params?: { disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * reply shortcut for `tg.api.sendChecklist` — sets `reply_parameters` to this message */ replyWithChecklist(checklist: TelegramInputChecklist, params?: { disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendContact` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendContact(phoneNumber: string, firstName: string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendContact` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithContact(phoneNumber: string, firstName: string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendDice` */ sendDice(params?: { message_thread_id?: number; direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendDice` — sets `reply_parameters` to this message */ replyWithDice(params?: { message_thread_id?: number; direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDocument` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendDocument(document: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendDocument` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithDocument(document: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendGame` */ sendGame(gameShortName: string, params?: { message_thread_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * reply shortcut for `tg.api.sendGame` — sets `reply_parameters` to this message */ replyWithGame(gameShortName: string, params?: { message_thread_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendGift` */ sendGift(giftId: string, params?: { user_id?: number; pay_for_upgrade?: boolean; text?: string | Formattable; text_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); text_entities?: TelegramMessageEntity[]; }): Promise; /** * shortcut for `tg.api.sendInvoice` */ sendInvoice(params: { message_thread_id?: number; direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * reply shortcut for `tg.api.sendInvoice` — sets `reply_parameters` to this message */ replyWithInvoice(params: { message_thread_id?: number; direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendLivePhoto` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendLivePhoto` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendLocation` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendLocation(latitude: number, longitude: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendLocation` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithLocation(latitude: number, longitude: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendMediaGroup` */ sendMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * reply shortcut for `tg.api.sendMediaGroup` — sets `reply_parameters` to this message */ replyWithMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * shortcut for `tg.api.sendMessage` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ send(text: string | Formattable, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendMessage` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ reply(text: string | Formattable, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendMessageDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendPaidMedia` */ sendPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendPaidMedia` — sets `reply_parameters` to this message */ replyWithPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPhoto` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendPhoto(photo: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendPhoto` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithPhoto(photo: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendPoll` */ sendPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { message_thread_id?: number; question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * reply shortcut for `tg.api.sendPoll` — sets `reply_parameters` to this message */ replyWithPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { message_thread_id?: number; question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendRichMessage` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichMessageDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendSticker` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendSticker(sticker: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendSticker` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithSticker(sticker: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendVenue` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendVenue(latitude: number, longitude: number, title: string, address: string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendVenue` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithVenue(latitude: number, longitude: number, title: string, address: string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendVideo` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendVideo(video: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendVideo` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithVideo(video: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendVideoNote` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendVideoNote(videoNote: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendVideoNote` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithVideoNote(videoNote: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendVoice` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendVoice(voice: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendVoice` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithVoice(voice: TelegramInputFile | string, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.setChatAdministratorCustomTitle` */ setChatAdministratorCustomTitle(user: number, customTitle: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatDescription` */ setChatDescription(params?: { description?: string; }): Promise; /** * shortcut for `tg.api.setChatMemberTag` */ setChatMemberTag(user: number, params?: { tag?: string; }): Promise; /** * shortcut for `tg.api.setChatMenuButton` */ setChatMenuButton(params?: { menu_button?: TelegramMenuButton; }): Promise; /** * shortcut for `tg.api.setChatPermissions` */ setChatPermissions(permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; }): Promise; /** * shortcut for `tg.api.setChatPhoto` */ setChatPhoto(photo: TelegramInputFile, params?: {}): Promise; /** * shortcut for `tg.api.setChatStickerSet` */ setChatStickerSet(stickerSetName: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatTitle` */ setChatTitle(title: string, params?: {}): Promise; /** * shortcut for `tg.api.setGameScore` */ setGameScore(user: number, score: number, params?: { force?: boolean; disable_edit_message?: boolean; inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.setMessageReaction` */ setMessageReaction(reactions: TelegramReactionType[], params?: { is_big?: boolean; }): Promise; /** * shortcut for `tg.api.stopMessageLiveLocation` */ stopLiveLocation(params?: { inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.stopPoll` */ stopPoll(params?: { reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.unbanChatMember` */ unbanChatMember(user: number, params?: { only_if_banned?: boolean; }): Promise; /** * shortcut for `tg.api.unbanChatSenderChat` */ unbanChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.unhideGeneralForumTopic` */ unhideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllChatMessages` */ unpinAllChatMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllForumTopicMessages` */ unpinAllForumTopicMessages(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.unpinAllGeneralForumTopicMessages` */ unpinAllGeneralForumTopicMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinChatMessage` */ unpin(params?: {}): Promise; /** * shortcut for `tg.api.verifyChat` */ verifyChat(params?: { custom_description?: string; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessage` — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ sendRich(richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * reply shortcut for `tg.api.sendRichMessage` — sets `reply_parameters` to this message — replying to an ephemeral message auto-fills `ephemeral_message_parameters.receiver_user_id` + `reply_parameters.ephemeral_message_id` (ephemeral responses only reach the receiver) */ replyWithRich(richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; ephemeral?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * thread-scoped shortcuts — auto-fill `message_thread_id` on every call. `undefined` when this message is not in a thread / forum topic */ get thread(): MessageThreadShortcuts | undefined; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `message` event */ export declare class MessageUpdate extends MessageShared { readonly kind: "message"; private __brand; } /** * update for the `edited_message` event */ export declare class EditedMessageUpdate extends MessageShared { readonly kind: "edited_message"; private __brand; } /** * update for the `channel_post` event */ export declare class ChannelPostUpdate extends MessageShared { readonly kind: "channel_post"; private __brand; } /** * update for the `edited_channel_post` event */ export declare class EditedChannelPostUpdate extends MessageShared { readonly kind: "edited_channel_post"; private __brand; } /** * update for the `business_connection` event */ export declare class BusinessConnectionUpdate { raw: TelegramBusinessConnection; readonly tg: TelegramLike; readonly kind: "business_connection"; private _user?; constructor(raw: TelegramBusinessConnection, tg: TelegramLike); /** * Unique identifier of the business connection */ get id(): string; /** * Business account user that created the business connection */ get user(): User; /** * Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. */ get userChatId(): number; /** * Date the connection was established in Unix time */ get date(): number; /** * Optional. Rights of the business bot */ get rights(): TelegramBusinessBotRights | undefined; /** * True, if the connection is active */ get isEnabled(): boolean; /** * true if `rights` is set */ hasRights(): this is this & { rights: TelegramBusinessBotRights; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `user.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `business_message` event */ export declare class BusinessMessageUpdate extends MessageShared { readonly kind: "business_message"; private __brand; } /** * update for the `edited_business_message` event */ export declare class EditedBusinessMessageUpdate extends MessageShared { readonly kind: "edited_business_message"; private __brand; } /** * update for the `deleted_business_messages` event */ export declare class DeletedBusinessMessagesUpdate { raw: TelegramBusinessMessagesDeleted; readonly tg: TelegramLike; readonly kind: "deleted_business_messages"; private _chat?; constructor(raw: TelegramBusinessMessagesDeleted, tg: TelegramLike); /** * Unique identifier of the business connection */ get businessConnectionId(): string; /** * Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. */ get chat(): Chat; /** * The list of identifiers of deleted messages in the chat of the business account */ get messageIds(): number[]; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `guest_message` event */ export declare class GuestMessageUpdate { raw: TelegramMessage; readonly tg: TelegramLike; readonly kind: "guest_message"; private _from?; private _senderChat?; private _senderBusinessBot?; private _receiverUser?; private _chat?; private _replyToMessage?; private _externalReply?; private _quote?; private _replyToStory?; private _viaBot?; private _guestBotCallerUser?; private _guestBotCallerChat?; private _entities?; private _linkPreviewOptions?; private _animation?; private _audio?; private _document?; private _livePhoto?; private _photo?; private _sticker?; private _story?; private _video?; private _videoNote?; private _voice?; private _captionEntities?; private _contact?; private _dice?; private _game?; private _poll?; private _venue?; private _location?; private _newChatMembers?; private _leftChatMember?; private _newChatPhoto?; private _invoice?; private _successfulPayment?; private _usersShared?; private _chatShared?; private _writeAccessAllowed?; private _passportData?; private _proximityAlertTriggered?; private _forumTopicCreated?; private _forumTopicEdited?; private _giveaway?; private _giveawayWinners?; private _giveawayCompleted?; private _videoChatScheduled?; private _videoChatEnded?; private _videoChatParticipantsInvited?; private _webAppData?; private _replyMarkup?; constructor(raw: TelegramMessage, tg: TelegramLike); /** * Unique message identifier inside this chat; 0 for ephemeral messages. In specific instances (e.g., a message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent. */ get id(): number; /** * Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only */ get messageThreadId(): number | undefined; /** * Optional. Information about the direct messages chat topic that contains the message */ get directMessagesTopic(): TelegramDirectMessagesTopic | undefined; /** * Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats. */ get from(): User | undefined; /** * Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats. */ get senderChat(): Chat | undefined; /** * Optional. If the sender of the message boosted the chat, the number of boosts added by the user */ get senderBoostCount(): number | undefined; /** * Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account. */ get senderBusinessBot(): User | undefined; /** * Optional. Tag or custom title of the sender of the message; for supergroups only */ get senderTag(): string | undefined; /** * Optional. For ephemeral messages, the user who received the message */ get receiverUser(): User | undefined; /** * Optional. For ephemeral messages, identifier of the ephemeral message inside this chat. The identifier may be reused for another ephemeral message after the message is deleted or expires. */ get ephemeralMessageId(): number | undefined; /** * Date the message was sent in Unix time. It is always a positive number, representing a valid date. */ get date(): number; /** * Optional. The unique identifier for the guest query. Use this identifier with the method answerGuestQuery to send a response message. If non-empty, the message belongs to the chat where the guest bot was summoned, which may not coincide with other existing bot chats sharing the same identifier. */ get guestQueryId(): string | undefined; /** * Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier. */ get businessConnectionId(): string | undefined; /** * Chat the message belongs to */ get chat(): Chat; /** * Optional. Information about the original message for forwarded messages */ get forwardOrigin(): TelegramMessageOrigin | undefined; /** * Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot */ get isTopicMessage(): true | undefined; /** * Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group */ get isAutomaticForward(): true | undefined; /** * Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. If the message is a reply to an ephemeral message, then this field may be omitted. */ get replyToMessage(): Message | undefined; /** * Optional. Information about the message that is being replied to, which may come from another chat or forum topic */ get externalReply(): ExternalReplyInfo | undefined; /** * Optional. For replies that quote part of the original message, the quoted part of the message */ get quote(): TextQuote | undefined; /** * Optional. For replies to a story, the original story */ get replyToStory(): Story | undefined; /** * Optional. Identifier of the specific checklist task that is being replied to */ get replyToChecklistTaskId(): number | undefined; /** * Optional. Persistent identifier of the specific poll option that is being replied to */ get replyToPollOptionId(): string | undefined; /** * Optional. Bot through which the message was sent */ get viaBot(): User | undefined; /** * Optional. For a message sent by a guest bot, this is the user whose original message triggered the bot's response */ get guestBotCallerUser(): User | undefined; /** * Optional. For a message sent by a guest bot, this is the chat whose original message triggered the bot's response */ get guestBotCallerChat(): Chat | undefined; /** * Optional. Date the message was last edited in Unix time */ get editDate(): number | undefined; /** * Optional. True, if the message can't be forwarded */ get hasProtectedContent(): true | undefined; /** * Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message */ get isFromOffline(): true | undefined; /** * Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited. */ get isPaidPost(): true | undefined; /** * Optional. The unique identifier inside this chat of a media message group this message belongs to */ get mediaGroupId(): string | undefined; /** * Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */ get authorSignature(): string | undefined; /** * Optional. The number of Telegram Stars that were paid by the sender of the message to send it */ get paidStarCount(): number | undefined; /** * Optional. For text messages, the actual UTF-8 text of the message */ get text(): string | undefined; /** * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */ get entities(): MessageEntity[] | undefined; /** * Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed */ get linkPreviewOptions(): LinkPreviewOptions | undefined; /** * Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited. */ get suggestedPostInfo(): TelegramSuggestedPostInfo | undefined; /** * Optional. Unique identifier of the message effect added to the message */ get effectId(): string | undefined; /** * Optional. Message is a rich formatted message */ get richMessage(): TelegramRichMessage | undefined; /** * Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set. */ get animation(): Animation | undefined; /** * Optional. Message is an audio file, information about the file */ get audio(): Audio | undefined; /** * Optional. Message is a general file, information about the file */ get document(): Document | undefined; /** * Optional. Message is a live photo, information about the live photo. For backward compatibility, when this field is set, the photo field will also be set. */ get livePhoto(): LivePhoto | undefined; /** * Optional. Message contains paid media; information about the paid media */ get paidMedia(): TelegramPaidMediaInfo | undefined; /** * Optional. Message is a photo, available sizes of the photo */ get photo(): Photo | undefined; /** * Optional. Message is a sticker, information about the sticker */ get sticker(): Sticker | undefined; /** * Optional. Message is a forwarded story */ get story(): Story | undefined; /** * Optional. Message is a video, information about the video */ get video(): Video | undefined; /** * Optional. Message is a video note, information about the video message */ get videoNote(): VideoNote | undefined; /** * Optional. Message is a voice message, information about the file */ get voice(): Voice | undefined; /** * Optional. Caption for the animation, audio, document, paid media, photo, video or voice */ get caption(): string | undefined; /** * Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */ get captionEntities(): MessageEntity[] | undefined; /** * Optional. True, if the caption must be shown above the message media */ get showCaptionAboveMedia(): true | undefined; /** * Optional. True, if the message media is covered by a spoiler animation */ get hasMediaSpoiler(): true | undefined; /** * Optional. Message is a checklist */ get checklist(): TelegramChecklist | undefined; /** * Optional. Message is a shared contact, information about the contact */ get contact(): Contact | undefined; /** * Optional. Message is a dice with random value */ get dice(): Dice | undefined; /** * Optional. Message is a game, information about the game. More about games » */ get game(): Game | undefined; /** * Optional. Message is a native poll, information about the poll */ get poll(): Poll | undefined; /** * Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set. */ get venue(): Venue | undefined; /** * Optional. Message is a shared location, information about the location */ get location(): Location | undefined; /** * Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */ get newChatMembers(): User[] | undefined; /** * Optional. A member was removed from the group, information about them (this member may be the bot itself) */ get leftChatMember(): User | undefined; /** * Optional. Service message: chat owner has left */ get chatOwnerLeft(): TelegramChatOwnerLeft | undefined; /** * Optional. Service message: chat owner has changed */ get chatOwnerChanged(): TelegramChatOwnerChanged | undefined; /** * Optional. A chat title was changed to this value */ get newChatTitle(): string | undefined; /** * Optional. A chat photo was change to this value */ get newChatPhoto(): Photo | undefined; /** * Optional. Service message: the chat photo was deleted */ get deleteChatPhoto(): true | undefined; /** * Optional. Service message: the group has been created */ get groupChatCreated(): true | undefined; /** * Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */ get supergroupChatCreated(): true | undefined; /** * Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */ get channelChatCreated(): true | undefined; /** * Optional. Service message: auto-delete timer settings changed in the chat */ get messageAutoDeleteTimerChanged(): TelegramMessageAutoDeleteTimerChanged | undefined; /** * Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */ get migrateToChatId(): number | undefined; /** * Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */ get migrateFromChatId(): number | undefined; /** * Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */ get pinnedMessage(): TelegramMaybeInaccessibleMessage | undefined; /** * Optional. Message is an invoice for a payment, information about the invoice. More about payments » */ get invoice(): Invoice | undefined; /** * Optional. Message is a service message about a successful payment, information about the payment. More about payments » */ get successfulPayment(): SuccessfulPayment | undefined; /** * Optional. Message is a service message about a refunded payment, information about the payment. More about payments » */ get refundedPayment(): TelegramRefundedPayment | undefined; /** * Optional. Service message: users were shared with the bot */ get usersShared(): UsersShared | undefined; /** * Optional. Service message: a chat was shared with the bot */ get chatShared(): ChatShared | undefined; /** * Optional. Service message: a regular gift was sent or received */ get gift(): TelegramGiftInfo | undefined; /** * Optional. Service message: a unique gift was sent or received */ get uniqueGift(): TelegramUniqueGiftInfo | undefined; /** * Optional. Service message: upgrade of a gift was purchased after the gift was sent */ get giftUpgradeSent(): TelegramGiftInfo | undefined; /** * Optional. The domain name of the website on which the user has logged in. More about Telegram Login » */ get connectedWebsite(): string | undefined; /** * Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess */ get writeAccessAllowed(): WriteAccessAllowed | undefined; /** * Optional. Telegram Passport data */ get passportData(): PassportData | undefined; /** * Optional. Service message: a user in the chat triggered another user's proximity alert while sharing Live Location */ get proximityAlertTriggered(): ProximityAlertTriggered | undefined; /** * Optional. Service message: user boosted the chat */ get boostAdded(): TelegramChatBoostAdded | undefined; /** * Optional. Service message: chat background set */ get chatBackgroundSet(): TelegramChatBackground | undefined; /** * Optional. Service message: some tasks in a checklist were marked as done or not done */ get checklistTasksDone(): TelegramChecklistTasksDone | undefined; /** * Optional. Service message: tasks were added to a checklist */ get checklistTasksAdded(): TelegramChecklistTasksAdded | undefined; /** * Optional. Service message: chat or bot added to a Community */ get communityChatAdded(): TelegramCommunityChatAdded | undefined; /** * Optional. Service message: chat was joined by a user from a Community */ get communityChatJoined(): TelegramCommunityChatJoined | undefined; /** * Optional. Service message: chat or bot removed from a Community */ get communityChatRemoved(): TelegramCommunityChatRemoved | undefined; /** * Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed */ get directMessagePriceChanged(): TelegramDirectMessagePriceChanged | undefined; /** * Optional. Service message: forum topic created */ get forumTopicCreated(): ForumTopicCreated | undefined; /** * Optional. Service message: forum topic edited */ get forumTopicEdited(): ForumTopicEdited | undefined; /** * Optional. Service message: forum topic closed */ get forumTopicClosed(): TelegramForumTopicClosed | undefined; /** * Optional. Service message: forum topic reopened */ get forumTopicReopened(): TelegramForumTopicReopened | undefined; /** * Optional. Service message: the 'General' forum topic hidden */ get generalForumTopicHidden(): TelegramGeneralForumTopicHidden | undefined; /** * Optional. Service message: the 'General' forum topic unhidden */ get generalForumTopicUnhidden(): TelegramGeneralForumTopicUnhidden | undefined; /** * Optional. Service message: a scheduled giveaway was created */ get giveawayCreated(): TelegramGiveawayCreated | undefined; /** * Optional. The message is a scheduled giveaway message */ get giveaway(): Giveaway | undefined; /** * Optional. A giveaway with public winners was completed */ get giveawayWinners(): GiveawayWinners | undefined; /** * Optional. Service message: a giveaway without public winners was completed */ get giveawayCompleted(): GiveawayCompleted | undefined; /** * Optional. Service message: user created a bot that will be managed by the current bot */ get managedBotCreated(): TelegramManagedBotCreated | undefined; /** * Optional. Service message: the price for paid messages has changed in the chat */ get paidMessagePriceChanged(): TelegramPaidMessagePriceChanged | undefined; /** * Optional. Service message: answer option was added to a poll */ get pollOptionAdded(): TelegramPollOptionAdded | undefined; /** * Optional. Service message: answer option was deleted from a poll */ get pollOptionDeleted(): TelegramPollOptionDeleted | undefined; /** * Optional. Service message: a suggested post was approved */ get suggestedPostApproved(): TelegramSuggestedPostApproved | undefined; /** * Optional. Service message: approval of a suggested post has failed */ get suggestedPostApprovalFailed(): TelegramSuggestedPostApprovalFailed | undefined; /** * Optional. Service message: a suggested post was declined */ get suggestedPostDeclined(): TelegramSuggestedPostDeclined | undefined; /** * Optional. Service message: payment for a suggested post was received */ get suggestedPostPaid(): TelegramSuggestedPostPaid | undefined; /** * Optional. Service message: payment for a suggested post was refunded */ get suggestedPostRefunded(): TelegramSuggestedPostRefunded | undefined; /** * Optional. Service message: video chat scheduled */ get videoChatScheduled(): VideoChatScheduled | undefined; /** * Optional. Service message: video chat started */ get videoChatStarted(): TelegramVideoChatStarted | undefined; /** * Optional. Service message: video chat ended */ get videoChatEnded(): VideoChatEnded | undefined; /** * Optional. Service message: new participants invited to a video chat */ get videoChatParticipantsInvited(): VideoChatParticipantsInvited | undefined; /** * Optional. Service message: data sent by a Web App */ get webAppData(): WebAppData | undefined; /** * Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */ get replyMarkup(): InlineKeyboardMarkup | undefined; /** * true if `message_thread_id` is set */ hasMessageThreadId(): this is this & { messageThreadId: number; thread: MessageThreadShortcuts; }; /** * true if `direct_messages_topic` is set */ hasDirectMessagesTopic(): this is this & { directMessagesTopic: TelegramDirectMessagesTopic; }; /** * true if `from` is set */ hasFrom(): this is this & { from: User; }; /** * true if `sender_chat` is set */ hasSenderChat(): this is this & { senderChat: Chat; }; /** * true if `sender_boost_count` is set */ hasSenderBoostCount(): this is this & { senderBoostCount: number; }; /** * true if `sender_business_bot` is set */ hasSenderBusinessBot(): this is this & { senderBusinessBot: User; }; /** * true if `sender_tag` is set */ hasSenderTag(): this is this & { senderTag: string; }; /** * true if `receiver_user` is set */ hasReceiverUser(): this is this & { receiverUser: User; }; /** * true if `ephemeral_message_id` is set */ hasEphemeralMessageId(): this is this & { ephemeralMessageId: number; }; /** * true if `guest_query_id` is set */ hasGuestQueryId(): this is this & { guestQueryId: string; }; /** * true if `business_connection_id` is set */ hasBusinessConnectionId(): this is this & { businessConnectionId: string; }; /** * true if `forward_origin` is set */ hasForwardOrigin(): this is this & { forwardOrigin: TelegramMessageOrigin; }; /** * true if `external_reply` is set */ hasExternalReply(): this is this & { externalReply: ExternalReplyInfo; }; /** * true if `quote` is set */ hasQuote(): this is this & { quote: TextQuote; }; /** * true if `reply_to_story` is set */ hasReplyToStory(): this is this & { replyToStory: Story; }; /** * true if `reply_to_checklist_task_id` is set */ hasReplyToChecklistTaskId(): this is this & { replyToChecklistTaskId: number; }; /** * true if `reply_to_poll_option_id` is set */ hasReplyToPollOptionId(): this is this & { replyToPollOptionId: string; }; /** * true if `via_bot` is set */ hasViaBot(): this is this & { viaBot: User; }; /** * true if `guest_bot_caller_user` is set */ hasGuestBotCallerUser(): this is this & { guestBotCallerUser: User; }; /** * true if `guest_bot_caller_chat` is set */ hasGuestBotCallerChat(): this is this & { guestBotCallerChat: Chat; }; /** * true if `edit_date` is set */ hasEditDate(): this is this & { editDate: number; }; /** * true if `media_group_id` is set */ hasMediaGroupId(): this is this & { mediaGroupId: string; }; /** * true if `author_signature` is set */ hasAuthorSignature(): this is this & { authorSignature: string; }; /** * true if `paid_star_count` is set */ hasPaidStarCount(): this is this & { paidStarCount: number; }; /** * true if `text` is set */ hasText(): this is this & { text: string; }; /** * true if `entities` has at least one item */ hasEntities(): this is this & { entities: MessageEntity[]; }; /** * true if `link_preview_options` is set */ hasLinkPreviewOptions(): this is this & { linkPreviewOptions: LinkPreviewOptions; }; /** * true if `suggested_post_info` is set */ hasSuggestedPostInfo(): this is this & { suggestedPostInfo: TelegramSuggestedPostInfo; }; /** * true if `effect_id` is set */ hasEffectId(): this is this & { effectId: string; }; /** * true if `rich_message` is set */ hasRichMessage(): this is this & { richMessage: TelegramRichMessage; }; /** * true if `animation` is set */ hasAnimation(): this is this & { animation: Animation; }; /** * true if `audio` is set */ hasAudio(): this is this & { audio: Audio; }; /** * true if `document` is set */ hasDocument(): this is this & { document: Document; }; /** * true if `live_photo` is set */ hasLivePhoto(): this is this & { livePhoto: LivePhoto; }; /** * true if `paid_media` is set */ hasPaidMedia(): this is this & { paidMedia: TelegramPaidMediaInfo; }; /** * true if `photo` has at least one item */ hasPhoto(): this is this & { photo: Photo; }; /** * true if `sticker` is set */ hasSticker(): this is this & { sticker: Sticker; }; /** * true if `story` is set */ hasStory(): this is this & { story: Story; }; /** * true if `video` is set */ hasVideo(): this is this & { video: Video; }; /** * true if `video_note` is set */ hasVideoNote(): this is this & { videoNote: VideoNote; }; /** * true if `voice` is set */ hasVoice(): this is this & { voice: Voice; }; /** * true if `caption` is set */ hasCaption(): this is this & { caption: string; }; /** * true if `caption_entities` has at least one item */ hasCaptionEntities(): this is this & { captionEntities: MessageEntity[]; }; /** * true if `show_caption_above_media` is set */ hasShowCaptionAboveMedia(): this is this & { showCaptionAboveMedia: true; }; /** * true if `checklist` is set */ hasChecklist(): this is this & { checklist: TelegramChecklist; }; /** * true if `contact` is set */ hasContact(): this is this & { contact: Contact; }; /** * true if `dice` is set */ hasDice(): this is this & { dice: Dice; }; /** * true if `game` is set */ hasGame(): this is this & { game: Game; }; /** * true if `poll` is set */ hasPoll(): this is this & { poll: Poll; }; /** * true if `venue` is set */ hasVenue(): this is this & { venue: Venue; }; /** * true if `location` is set */ hasLocation(): this is this & { location: Location; }; /** * true if `new_chat_members` has at least one item */ hasNewChatMembers(): this is this & { newChatMembers: User[]; }; /** * true if `left_chat_member` is set */ hasLeftChatMember(): this is this & { leftChatMember: User; }; /** * true if `chat_owner_left` is set */ hasChatOwnerLeft(): this is this & { chatOwnerLeft: TelegramChatOwnerLeft; }; /** * true if `chat_owner_changed` is set */ hasChatOwnerChanged(): this is this & { chatOwnerChanged: TelegramChatOwnerChanged; }; /** * true if `new_chat_title` is set */ hasNewChatTitle(): this is this & { newChatTitle: string; }; /** * true if `new_chat_photo` has at least one item */ hasNewChatPhoto(): this is this & { newChatPhoto: Photo; }; /** * true if `delete_chat_photo` is set */ hasDeleteChatPhoto(): this is this & { deleteChatPhoto: true; }; /** * true if `group_chat_created` is set */ hasGroupChatCreated(): this is this & { groupChatCreated: true; }; /** * true if `supergroup_chat_created` is set */ hasSupergroupChatCreated(): this is this & { supergroupChatCreated: true; }; /** * true if `channel_chat_created` is set */ hasChannelChatCreated(): this is this & { channelChatCreated: true; }; /** * true if `message_auto_delete_timer_changed` is set */ hasMessageAutoDeleteTimerChanged(): this is this & { messageAutoDeleteTimerChanged: TelegramMessageAutoDeleteTimerChanged; }; /** * true if `migrate_to_chat_id` is set */ hasMigrateToChatId(): this is this & { migrateToChatId: number; }; /** * true if `migrate_from_chat_id` is set */ hasMigrateFromChatId(): this is this & { migrateFromChatId: number; }; /** * true if `pinned_message` is set */ hasPinnedMessage(): this is this & { pinnedMessage: TelegramMaybeInaccessibleMessage; }; /** * true if `invoice` is set */ hasInvoice(): this is this & { invoice: Invoice; }; /** * true if `successful_payment` is set */ hasSuccessfulPayment(): this is this & { successfulPayment: SuccessfulPayment; }; /** * true if `refunded_payment` is set */ hasRefundedPayment(): this is this & { refundedPayment: TelegramRefundedPayment; }; /** * true if `users_shared` is set */ hasUsersShared(): this is this & { usersShared: UsersShared; }; /** * true if `chat_shared` is set */ hasChatShared(): this is this & { chatShared: ChatShared; }; /** * true if `gift` is set */ hasGift(): this is this & { gift: TelegramGiftInfo; }; /** * true if `unique_gift` is set */ hasUniqueGift(): this is this & { uniqueGift: TelegramUniqueGiftInfo; }; /** * true if `gift_upgrade_sent` is set */ hasGiftUpgradeSent(): this is this & { giftUpgradeSent: TelegramGiftInfo; }; /** * true if `connected_website` is set */ hasConnectedWebsite(): this is this & { connectedWebsite: string; }; /** * true if `write_access_allowed` is set */ hasWriteAccessAllowed(): this is this & { writeAccessAllowed: WriteAccessAllowed; }; /** * true if `passport_data` is set */ hasPassportData(): this is this & { passportData: PassportData; }; /** * true if `proximity_alert_triggered` is set */ hasProximityAlertTriggered(): this is this & { proximityAlertTriggered: ProximityAlertTriggered; }; /** * true if `boost_added` is set */ hasBoostAdded(): this is this & { boostAdded: TelegramChatBoostAdded; }; /** * true if `chat_background_set` is set */ hasChatBackgroundSet(): this is this & { chatBackgroundSet: TelegramChatBackground; }; /** * true if `checklist_tasks_done` is set */ hasChecklistTasksDone(): this is this & { checklistTasksDone: TelegramChecklistTasksDone; }; /** * true if `checklist_tasks_added` is set */ hasChecklistTasksAdded(): this is this & { checklistTasksAdded: TelegramChecklistTasksAdded; }; /** * true if `community_chat_added` is set */ hasCommunityChatAdded(): this is this & { communityChatAdded: TelegramCommunityChatAdded; }; /** * true if `community_chat_joined` is set */ hasCommunityChatJoined(): this is this & { communityChatJoined: TelegramCommunityChatJoined; }; /** * true if `community_chat_removed` is set */ hasCommunityChatRemoved(): this is this & { communityChatRemoved: TelegramCommunityChatRemoved; }; /** * true if `direct_message_price_changed` is set */ hasDirectMessagePriceChanged(): this is this & { directMessagePriceChanged: TelegramDirectMessagePriceChanged; }; /** * true if `forum_topic_created` is set */ hasForumTopicCreated(): this is this & { forumTopicCreated: ForumTopicCreated; }; /** * true if `forum_topic_edited` is set */ hasForumTopicEdited(): this is this & { forumTopicEdited: ForumTopicEdited; }; /** * true if `forum_topic_closed` is set */ hasForumTopicClosed(): this is this & { forumTopicClosed: TelegramForumTopicClosed; }; /** * true if `forum_topic_reopened` is set */ hasForumTopicReopened(): this is this & { forumTopicReopened: TelegramForumTopicReopened; }; /** * true if `general_forum_topic_hidden` is set */ hasGeneralForumTopicHidden(): this is this & { generalForumTopicHidden: TelegramGeneralForumTopicHidden; }; /** * true if `general_forum_topic_unhidden` is set */ hasGeneralForumTopicUnhidden(): this is this & { generalForumTopicUnhidden: TelegramGeneralForumTopicUnhidden; }; /** * true if `giveaway_created` is set */ hasGiveawayCreated(): this is this & { giveawayCreated: TelegramGiveawayCreated; }; /** * true if `giveaway` is set */ hasGiveaway(): this is this & { giveaway: Giveaway; }; /** * true if `giveaway_winners` is set */ hasGiveawayWinners(): this is this & { giveawayWinners: GiveawayWinners; }; /** * true if `giveaway_completed` is set */ hasGiveawayCompleted(): this is this & { giveawayCompleted: GiveawayCompleted; }; /** * true if `managed_bot_created` is set */ hasManagedBotCreated(): this is this & { managedBotCreated: TelegramManagedBotCreated; }; /** * true if `paid_message_price_changed` is set */ hasPaidMessagePriceChanged(): this is this & { paidMessagePriceChanged: TelegramPaidMessagePriceChanged; }; /** * true if `poll_option_added` is set */ hasPollOptionAdded(): this is this & { pollOptionAdded: TelegramPollOptionAdded; }; /** * true if `poll_option_deleted` is set */ hasPollOptionDeleted(): this is this & { pollOptionDeleted: TelegramPollOptionDeleted; }; /** * true if `suggested_post_approved` is set */ hasSuggestedPostApproved(): this is this & { suggestedPostApproved: TelegramSuggestedPostApproved; }; /** * true if `suggested_post_approval_failed` is set */ hasSuggestedPostApprovalFailed(): this is this & { suggestedPostApprovalFailed: TelegramSuggestedPostApprovalFailed; }; /** * true if `suggested_post_declined` is set */ hasSuggestedPostDeclined(): this is this & { suggestedPostDeclined: TelegramSuggestedPostDeclined; }; /** * true if `suggested_post_paid` is set */ hasSuggestedPostPaid(): this is this & { suggestedPostPaid: TelegramSuggestedPostPaid; }; /** * true if `suggested_post_refunded` is set */ hasSuggestedPostRefunded(): this is this & { suggestedPostRefunded: TelegramSuggestedPostRefunded; }; /** * true if `video_chat_scheduled` is set */ hasVideoChatScheduled(): this is this & { videoChatScheduled: VideoChatScheduled; }; /** * true if `video_chat_started` is set */ hasVideoChatStarted(): this is this & { videoChatStarted: TelegramVideoChatStarted; }; /** * true if `video_chat_ended` is set */ hasVideoChatEnded(): this is this & { videoChatEnded: VideoChatEnded; }; /** * true if `video_chat_participants_invited` is set */ hasVideoChatParticipantsInvited(): this is this & { videoChatParticipantsInvited: VideoChatParticipantsInvited; }; /** * true if `web_app_data` is set */ hasWebAppData(): this is this & { webAppData: WebAppData; }; /** * true if `reply_markup` is set */ hasReplyMarkup(): this is this & { replyMarkup: InlineKeyboardMarkup; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `chat.id` */ get chatId(): number; /** * best-effort sender id: `from.id` → `sender_chat.id` → `chat.id` */ get senderId(): number; /** * shortcut for `reply_to_message?.message_id` */ get replyToMessageId(): number | undefined; /** * deep-link payload after `/start` (`t.me/?start=`) — grounded in the `bot_command` entity telegram parsed, so text that merely looks like a command never matches, and a `/start@other_bot` addressed to a different bot yields `undefined` (mentions are checked against `tg.bot.username`). `undefined` when this is not a `/start` command or no payload was sent. see also `filters.start` (regex-based and mention-agnostic by design) */ get startPayload(): string | undefined; /** * true if this message has `reply_to_message` */ hasReplyToMessage(): this is Has; /** * true if this message is a `/start` command carrying a deep-link payload */ hasStartPayload(): this is Has; /** * true if any `entities` item has the given `type` */ hasEntitiesOf(type: string): boolean; /** * true if any `caption_entities` item has the given `type` */ hasCaptionEntitiesOf(type: string): boolean; /** * alias for `hasForwardOrigin()` */ isForwarded(): this is Has; /** * true if this message is a reply */ isReply(): this is Has; /** * true if this message is ephemeral (visible only to one user and the bot). sends/replies from an ephemeral context auto-fill the ephemeral params — pass `ephemeral: false` to send a regular message instead */ isEphemeral(): this is Has; /** * true if this message is part of a media group (album). use `await update.collectMediaGroup()` from `@puregram/flow` to fetch the full album */ isMediaGroup(): boolean; /** * true if `chat.type === "private"` */ isPrivate(): boolean; /** * true if `chat.type === "group"` (strict — supergroups excluded) */ isGroup(): boolean; /** * true if `chat.type === "supergroup"` */ isSupergroup(): boolean; /** * true if `chat.type === "channel"` */ isChannel(): boolean; /** * download the message attachment as a `Buffer`. returns `null` if the message has no media. auto-picks with priority `document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker` */ download(): Promise; /** * download the message attachment as a node `Readable`. returns `null` if no media */ downloadStream(): Promise; /** * download the message attachment as an async-iterable byte stream. returns `null` if no media */ downloadIterable(): Promise | null>; /** * download the message attachment to disk. returns `null` if no media; otherwise resolves once the file is fully written */ downloadToFile(path: string): Promise; /** * create a controller that re-sends `sendChatAction(action)` every `interval` ms (default 5000) until `stop()` is called — telegram clears the action after ~5 seconds, so a long task needs it refreshed */ createActionController(action: ActionControllerLike["action"], options?: ActionControllerParams): ActionControllerLike; /** * run `fn` while continuously sending `sendChatAction(action)`. the action auto-stops when `fn` settles — even if it throws — and `fn`'s result is returned */ withChatAction(action: ActionControllerLike["action"], fn: () => Promise | T, options?: ActionControllerParams): Promise; /** * react to this message — an emoji string for the common case, or a reaction array for custom / multiple */ react(reaction: string | TelegramReactionType[], params?: Omit): Promise; /** * edit this message to rich content (build it with @puregram/rich) */ editRich(richMessage: TelegramInputRichMessage | RichLike, params?: Omit): Promise; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.answerGuestQuery` */ answer(result: TelegramInlineQueryResult, params?: {}): Promise; /** * thread-scoped shortcuts — auto-fill `message_thread_id` on every call. `undefined` when this message is not in a thread / forum topic */ get thread(): MessageThreadShortcuts | undefined; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `message_reaction` event */ export declare class MessageReactionUpdate { raw: TelegramMessageReactionUpdated; readonly tg: TelegramLike; readonly kind: "message_reaction"; private _chat?; private _user?; private _actorChat?; private _oldReaction?; private _newReaction?; constructor(raw: TelegramMessageReactionUpdated, tg: TelegramLike); /** * The chat containing the message the user reacted to */ get chat(): Chat; /** * Unique identifier of the message inside the chat */ get id(): number; /** * Optional. The user that changed the reaction, if the user isn't anonymous */ get user(): User | undefined; /** * Optional. The chat on behalf of which the reaction was changed, if the user is anonymous */ get actorChat(): Chat | undefined; /** * Date of the change in Unix time */ get date(): number; /** * Previous list of reaction types that were set by the user */ get oldReaction(): Reactions; /** * New list of reaction types that have been set by the user */ get newReaction(): Reactions; /** * true if `user` is set */ hasUser(): this is this & { user: User; }; /** * true if `actor_chat` is set */ hasActorChat(): this is this & { actorChat: Chat; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * reactions present in `newReaction` but not in `oldReaction` */ get added(): Reactions; /** * reactions present in `oldReaction` but not in `newReaction` */ get removed(): Reactions; /** * best-effort sender id: `user.id` → `actor_chat.id` */ get senderId(): number | undefined; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `message_reaction_count` event */ export declare class MessageReactionCountUpdate { raw: TelegramMessageReactionCountUpdated; readonly tg: TelegramLike; readonly kind: "message_reaction_count"; private _chat?; private _reactions?; constructor(raw: TelegramMessageReactionCountUpdated, tg: TelegramLike); /** * The chat containing the message */ get chat(): Chat; /** * Unique message identifier inside the chat */ get id(): number; /** * Date of the change in Unix time */ get date(): number; /** * List of reactions that are present on the message */ get reactions(): ReactionCounts; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `inline_query` event */ export declare class InlineQueryUpdate { raw: TelegramInlineQuery; readonly tg: TelegramLike; readonly kind: "inline_query"; private _from?; private _location?; constructor(raw: TelegramInlineQuery, tg: TelegramLike); /** * Unique identifier for this query */ get id(): string; /** * Sender */ get from(): User; /** * Text of the query (up to 256 characters) */ get query(): string; /** * Offset of the results to be returned, can be controlled by the bot */ get offset(): string; /** * Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat. */ get chatType(): ("sender" | "private" | "group" | "supergroup" | "channel") | undefined; /** * Optional. Sender location, only for bots that request user location */ get location(): Location | undefined; /** * true if `chat_type` is set */ hasChatType(): this is this & { chatType: "sender" | "private" | "group" | "supergroup" | "channel"; }; /** * true if `location` is set */ hasLocation(): this is this & { location: Location; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.answerInlineQuery` */ answer(results: TelegramInlineQueryResult[], params?: { cache_time?: number; is_personal?: boolean; next_offset?: string; button?: TelegramInlineQueryResultsButton; }): Promise; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `chosen_inline_result` event */ export declare class ChosenInlineResultUpdate { raw: TelegramChosenInlineResult; readonly tg: TelegramLike; readonly kind: "chosen_inline_result"; private _from?; private _location?; constructor(raw: TelegramChosenInlineResult, tg: TelegramLike); /** * The unique identifier for the result that was chosen */ get resultId(): string; /** * The user that chose the result */ get from(): User; /** * Optional. Sender location, only for bots that require user location */ get location(): Location | undefined; /** * Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. */ get inlineMessageId(): string | undefined; /** * The query that was used to obtain the result */ get query(): string; /** * true if `location` is set */ hasLocation(): this is this & { location: Location; }; /** * true if `inline_message_id` is set */ hasInlineMessageId(): this is this & { inlineMessageId: string; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `callback_query` event */ export declare class CallbackQueryUpdate { raw: TelegramCallbackQuery; readonly tg: TelegramLike; readonly kind: "callback_query"; private _from?; constructor(raw: TelegramCallbackQuery, tg: TelegramLike); /** * Unique identifier for this query */ get id(): string; /** * Sender */ get from(): User; /** * Optional. Message sent by the bot with the callback button that originated the query */ get message(): TelegramMaybeInaccessibleMessage | undefined; /** * Optional. Identifier of the message sent via the bot in inline mode, that originated the query */ get inlineMessageId(): string | undefined; /** * Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. */ get chatInstance(): string; /** * Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data. */ get data(): string | undefined; /** * Optional. Short name of a Game to be returned, serves as the unique identifier for the game */ get gameShortName(): string | undefined; /** * true if `message` is set */ hasMessage(): this is this & { message: TelegramMaybeInaccessibleMessage; }; /** * true if `inline_message_id` is set */ hasInlineMessageId(): this is this & { inlineMessageId: string; }; /** * true if `data` is set */ hasData(): this is this & { data: string; }; /** * true if `game_short_name` is set */ hasGameShortName(): this is this & { gameShortName: string; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `message?.chat.id` */ get chatId(): number | undefined; /** * shortcut for `message?.message_id` */ get messageId(): number | undefined; /** * shortcut for `from.id` — alias of `senderId` */ get userId(): number; /** * shortcut for `tg.api.editMessageText` on the message this callback query came from — auto-fills `chat_id` + `message_id`, or `inline_message_id` for inline-mode messages (those resolve `true` instead of the edited message) */ edit(text: string | Formattable, params?: Omit): Promise; /** * shortcut for `tg.api.editMessageCaption` on the message this callback query came from — inline-mode edits resolve `true` */ editCaption(params?: Omit): Promise; /** * shortcut for `tg.api.editMessageMedia` on the message this callback query came from — inline-mode edits resolve `true` */ editMedia(media: EditMessageMediaParams["media"], params?: Omit): Promise; /** * shortcut for `tg.api.editMessageReplyMarkup` on the message this callback query came from — the pager pattern: swap the keyboard in place. inline-mode edits resolve `true` */ editReplyMarkup(params?: Omit): Promise; /** * edit the message this callback query came from to rich content (build it with @puregram/rich) — inline-mode edits resolve `true` */ editRich(richMessage: TelegramInputRichMessage | RichLike, params?: Omit): Promise; /** * shortcut for `tg.api.deleteMessage` on the message this callback query came from. throws for inline-mode messages — there is nothing to delete */ delete(params?: Omit): Promise; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.answerCallbackQuery` */ answer(params?: { text?: string; show_alert?: boolean; url?: string; cache_time?: number; }): Promise; /** * shortcut for `tg.api.sendAnimation` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendAnimation(chat: number | string, animation: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendAudio` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendAudio(chat: number | string, audio: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendContact` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendContact(chat: number | string, phoneNumber: string, firstName: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDocument` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendDocument(chat: number | string, document: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendLivePhoto` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendLivePhoto(chat: number | string, livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendLocation` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendLocation(chat: number | string, latitude: number, longitude: number, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMessage` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ send(chat: number | string, text: string | Formattable, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPhoto` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendPhoto(chat: number | string, photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendRichMessage(chat: number | string, richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendSticker` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendSticker(chat: number | string, sticker: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVenue` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendVenue(chat: number | string, latitude: number, longitude: number, title: string, address: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideo` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendVideo(chat: number | string, video: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideoNote` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendVideoNote(chat: number | string, videoNote: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVoice` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendVoice(chat: number | string, voice: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` — pass `ephemeral_message_parameters` to send an ephemeral response; its `callback_query_id` then auto-fills from this query */ sendRich(chat: number | string, richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `shipping_query` event */ export declare class ShippingQueryUpdate { raw: TelegramShippingQuery; readonly tg: TelegramLike; readonly kind: "shipping_query"; private _from?; private _shippingAddress?; constructor(raw: TelegramShippingQuery, tg: TelegramLike); /** * Unique query identifier */ get id(): string; /** * User who sent the query */ get from(): User; /** * Bot-specified invoice payload */ get invoicePayload(): string; /** * User specified shipping address */ get shippingAddress(): ShippingAddress; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.answerShippingQuery` */ answer(ok: boolean, params?: { shipping_options?: TelegramShippingOption[]; error_message?: string; }): Promise; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `pre_checkout_query` event */ export declare class PreCheckoutQueryUpdate { raw: TelegramPreCheckoutQuery; readonly tg: TelegramLike; readonly kind: "pre_checkout_query"; private _from?; private _orderInfo?; constructor(raw: TelegramPreCheckoutQuery, tg: TelegramLike); /** * Unique query identifier */ get id(): string; /** * User who sent the query */ get from(): User; /** * Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */ get currency(): string; /** * Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ get totalAmount(): number; /** * Bot-specified invoice payload */ get invoicePayload(): string; /** * Optional. Identifier of the shipping option chosen by the user */ get shippingOptionId(): string | undefined; /** * Optional. Order information provided by the user */ get orderInfo(): OrderInfo | undefined; /** * true if `shipping_option_id` is set */ hasShippingOptionId(): this is this & { shippingOptionId: string; }; /** * true if `order_info` is set */ hasOrderInfo(): this is this & { orderInfo: OrderInfo; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.answerPreCheckoutQuery` */ answer(ok: boolean, params?: { error_message?: string; }): Promise; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `purchased_paid_media` event */ export declare class PurchasedPaidMediaUpdate { raw: TelegramPaidMediaPurchased; readonly tg: TelegramLike; readonly kind: "purchased_paid_media"; private _from?; constructor(raw: TelegramPaidMediaPurchased, tg: TelegramLike); /** * User who purchased the media */ get from(): User; /** * Bot-specified paid media payload */ get paidMediaPayload(): string; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `poll` event */ export declare class PollUpdate { raw: TelegramPoll; readonly tg: TelegramLike; readonly kind: "poll"; private _questionEntities?; private _options?; private _explanationEntities?; private _explanationMedia?; private _descriptionEntities?; private _media?; constructor(raw: TelegramPoll, tg: TelegramLike); /** * Unique poll identifier */ get id(): string; /** * Poll question, 1-300 characters */ get question(): string; /** * Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions */ get questionEntities(): MessageEntity[] | undefined; /** * List of poll options */ get options(): PollOptions; /** * Total number of users that voted in the poll */ get totalVoterCount(): number; /** * True, if the poll is closed */ get isClosed(): boolean; /** * True, if the poll is anonymous */ get isAnonymous(): boolean; /** * Poll type, currently can be “regular” or “quiz” */ get type(): "regular" | "quiz"; /** * True, if the poll allows multiple answers */ get allowsMultipleAnswers(): boolean; /** * True, if the poll allows to change the chosen answer options */ get allowsRevoting(): boolean; /** * True if voting is limited to users who have been members of the chat where the poll was originally sent for more than 24 hours */ get membersOnly(): boolean; /** * Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which users can vote in the poll. The country code “FT” is used for users with anonymous numbers. If omitted, then users from any country can participate in the poll. */ get countryCodes(): string[] | undefined; /** * Optional. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot. */ get correctOptionIds(): number[] | undefined; /** * Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters */ get explanation(): string | undefined; /** * Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation */ get explanationEntities(): MessageEntity[] | undefined; /** * Optional. Media added to the quiz explanation */ get explanationMedia(): PollMedia | undefined; /** * Optional. Amount of time in seconds the poll will be active after creation */ get openPeriod(): number | undefined; /** * Optional. Point in time (Unix timestamp) when the poll will be automatically closed */ get closeDate(): number | undefined; /** * Optional. Description of the poll; for polls inside the Message object only */ get description(): string | undefined; /** * Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the description */ get descriptionEntities(): MessageEntity[] | undefined; /** * Optional. Media added to the poll description; for polls inside the Message object only */ get media(): PollMedia | undefined; /** * true if `question_entities` has at least one item */ hasQuestionEntities(): this is this & { questionEntities: MessageEntity[]; }; /** * true if `country_codes` has at least one item */ hasCountryCodes(): this is this & { countryCodes: string[]; }; /** * true if `correct_option_ids` has at least one item */ hasCorrectOptionIds(): this is this & { correctOptionIds: number[]; }; /** * true if `explanation` is set */ hasExplanation(): this is this & { explanation: string; }; /** * true if `explanation_entities` has at least one item */ hasExplanationEntities(): this is this & { explanationEntities: MessageEntity[]; }; /** * true if `explanation_media` is set */ hasExplanationMedia(): this is this & { explanationMedia: PollMedia; }; /** * true if `open_period` is set */ hasOpenPeriod(): this is this & { openPeriod: number; }; /** * true if `close_date` is set */ hasCloseDate(): this is this & { closeDate: number; }; /** * true if `description` is set */ hasDescription(): this is this & { description: string; }; /** * true if `description_entities` has at least one item */ hasDescriptionEntities(): this is this & { descriptionEntities: MessageEntity[]; }; /** * true if `media` is set */ hasMedia(): this is this & { media: PollMedia; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `poll_answer` event */ export declare class PollAnswerUpdate { raw: TelegramPollAnswer; readonly tg: TelegramLike; readonly kind: "poll_answer"; private _voterChat?; private _user?; constructor(raw: TelegramPollAnswer, tg: TelegramLike); /** * Unique poll identifier */ get pollId(): string; /** * Optional. The chat that changed the answer to the poll, if the voter is anonymous */ get voterChat(): Chat | undefined; /** * Optional. The user that changed the answer to the poll, if the voter isn't anonymous */ get user(): User | undefined; /** * 0-based identifiers of chosen answer options. May be empty if the vote was retracted. */ get optionIds(): number[]; /** * Persistent identifiers of the chosen answer options. May be empty if the vote was retracted. */ get optionPersistentIds(): string[]; /** * true if `voter_chat` is set */ hasVoterChat(): this is this & { voterChat: Chat; }; /** * true if `user` is set */ hasUser(): this is this & { user: User; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * best-effort sender id: `user.id` → `voter_chat.id` */ get senderId(): number | undefined; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * shared base for every update built from `TelegramChatMemberUpdated` — implementation detail, not exported */ declare class ChatMemberUpdatedShared { raw: TelegramChatMemberUpdated; readonly tg: TelegramLike; readonly kind: string; private _chat?; private _from?; private _oldChatMember?; private _newChatMember?; private _inviteLink?; constructor(raw: TelegramChatMemberUpdated, tg: TelegramLike); /** * Chat the user belongs to */ get chat(): Chat; /** * Performer of the action, which resulted in the change */ get from(): User; /** * Date the change was done in Unix time */ get date(): number; /** * Previous information about the chat member */ get oldChatMember(): ChatMember; /** * New information about the chat member */ get newChatMember(): ChatMember; /** * Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only */ get inviteLink(): ChatInviteLink | undefined; /** * Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator */ get viaJoinRequest(): boolean | undefined; /** * Optional. True, if the user joined the chat via a chat folder invite link */ get viaChatFolderInviteLink(): boolean | undefined; /** * true if `invite_link` is set */ hasInviteLink(): this is this & { inviteLink: ChatInviteLink; }; /** * true if `via_join_request` is set */ hasViaJoinRequest(): this is this & { viaJoinRequest: boolean; }; /** * true if `via_chat_folder_invite_link` is set */ hasViaChatFolderInviteLink(): this is this & { viaChatFolderInviteLink: boolean; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `old_chat_member.status` */ get oldStatus(): string; /** * shortcut for `new_chat_member.status` */ get newStatus(): string; /** * true if old status is `creator` */ wasCreator(): boolean; /** * true if new status is `creator` */ isNowCreator(): boolean; /** * true if old status is `administrator` */ wasAdmin(): boolean; /** * true if new status is `administrator` */ isNowAdmin(): boolean; /** * true if old status is `member` */ wasMember(): boolean; /** * true if new status is `member` */ isNowMember(): boolean; /** * true if old status is `restricted` */ wasRestricted(): boolean; /** * true if new status is `restricted` */ isNowRestricted(): boolean; /** * true if old status is `left` */ wasLeft(): boolean; /** * true if new status is `left` */ isNowLeft(): boolean; /** * true if old status is `kicked` (banned) */ wasKicked(): boolean; /** * true if new status is `kicked` (banned) */ isNowKicked(): boolean; /** * true if the user was outside the chat (`left`/`kicked`) and is now in it */ didJoinChat(): boolean; /** * true if the user was in the chat and is now outside it (`left`/`kicked`) */ didLeaveChat(): boolean; /** * true if the user gained `creator` or `administrator` status */ wasPromoted(): boolean; /** * true if the user lost `creator` or `administrator` status */ wasDemoted(): boolean; /** * true if the user was just kicked (banned) */ wasBanned(): boolean; /** * true if the user was kicked and no longer is */ wasUnbanned(): boolean; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.approveChatJoinRequest` */ approveChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.approveSuggestedPost` */ approveSuggestedPost(messageId: number, params?: { send_date?: number; }): Promise; /** * shortcut for `tg.api.banChatMember` */ banChatMember(user: number, params?: { until_date?: number; revoke_messages?: boolean; }): Promise; /** * shortcut for `tg.api.banChatSenderChat` */ banChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.closeForumTopic` */ closeForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.closeGeneralForumTopic` */ closeGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.copyMessage` */ copy(from: number | string, messageId: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.copyMessages` */ copyMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; remove_caption?: boolean; }): Promise; /** * shortcut for `tg.api.createChatInviteLink` */ createChatInviteLink(params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.createChatSubscriptionInviteLink` */ createChatSubscriptionInviteLink(subscriptionPeriod: number, subscriptionPrice: number, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.createForumTopic` */ createForumTopic(name: string, params?: { icon_color?: number; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.declineChatJoinRequest` */ declineChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.declineSuggestedPost` */ declineSuggestedPost(messageId: number, params?: { comment?: string; }): Promise; /** * shortcut for `tg.api.deleteAllMessageReactions` */ deleteAllMessageReactions(params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteChatPhoto` */ deleteChatPhoto(params?: {}): Promise; /** * shortcut for `tg.api.deleteChatStickerSet` */ deleteChatStickerSet(params?: {}): Promise; /** * shortcut for `tg.api.deleteEphemeralMessage` */ deleteEphemeralMessage(params: { receiver_user_id: number; ephemeral_message_id: number; }): Promise; /** * shortcut for `tg.api.deleteForumTopic` */ deleteForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.deleteMessage` */ delete(messageId: number, params?: {}): Promise; /** * shortcut for `tg.api.deleteMessageReaction` */ deleteMessageReaction(messageId: number, params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteMessages` */ deleteMany(messageIds: number[], params?: {}): Promise; /** * shortcut for `tg.api.editChatInviteLink` */ editChatInviteLink(inviteLink: string, params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.editChatSubscriptionInviteLink` */ editChatSubscriptionInviteLink(inviteLink: string, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageCaption` */ editEphemeralMessageCaption(params: { receiver_user_id: number; ephemeral_message_id: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageMedia` */ editEphemeralMessageMedia(params: { receiver_user_id: number; ephemeral_message_id: number; media: TelegramInputMedia; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageReplyMarkup` */ editEphemeralMessageReplyMarkup(params: { receiver_user_id: number; ephemeral_message_id: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageText` */ editEphemeralMessageText(params: { receiver_user_id: number; ephemeral_message_id: number; text?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; rich_message?: TelegramInputRichMessage; link_preview_options?: TelegramLinkPreviewOptions; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editForumTopic` */ editForumTopic(threadId: number, params?: { name?: string; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.editGeneralForumTopic` */ editGeneralForumTopic(name: string, params?: {}): Promise; /** * shortcut for `tg.api.editMessageCaption` */ editCaption(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageChecklist` */ editMessageChecklist(messageId: number, checklist: TelegramInputChecklist, params: { business_connection_id: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageLiveLocation` */ editLiveLocation(latitude: number, longitude: number, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; live_period?: number; horizontal_accuracy?: number; heading?: number; proximity_alert_radius?: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageMedia` */ editMedia(media: TelegramInputMedia, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageReplyMarkup` */ editReplyMarkup(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageText` */ edit(text: string | Formattable, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; rich_message?: TelegramInputRichMessage; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.exportChatInviteLink` */ exportChatInviteLink(params?: {}): Promise; /** * shortcut for `tg.api.forwardMessage` */ forward(from: number | string, messageId: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; }): Promise; /** * shortcut for `tg.api.forwardMessages` */ forwardMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; }): Promise; /** * shortcut for `tg.api.getChat` */ getChat(params?: {}): Promise; /** * shortcut for `tg.api.getChatAdministrators` */ getChatAdministrators(params?: { return_bots?: boolean; }): Promise<(import("./types.js").TelegramChatMemberOwner | import("./types.js").TelegramChatMemberAdministrator)[]>; /** * shortcut for `tg.api.getChatGifts` */ getChatGifts(params?: { exclude_unsaved?: boolean; exclude_saved?: boolean; exclude_unlimited?: boolean; exclude_limited_upgradable?: boolean; exclude_limited_non_upgradable?: boolean; exclude_from_blockchain?: boolean; exclude_unique?: boolean; sort_by_price?: boolean; offset?: string; limit?: number; }): Promise; /** * shortcut for `tg.api.getChatMember` */ getChatMember(user: number, params?: {}): Promise; /** * shortcut for `tg.api.getChatMemberCount` */ getChatMemberCount(params?: {}): Promise; /** * shortcut for `tg.api.getChatMenuButton` */ getChatMenuButton(params?: {}): Promise; /** * shortcut for `tg.api.getGameHighScores` */ getGameHighScores(user: number, params?: { message_id?: number; inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.getUserChatBoosts` */ getUserChatBoosts(user: number, params?: {}): Promise; /** * shortcut for `tg.api.hideGeneralForumTopic` */ hideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.leaveChat` */ leaveChat(params?: {}): Promise; /** * shortcut for `tg.api.pinChatMessage` */ pin(messageId: number, params?: { business_connection_id?: string; disable_notification?: boolean; }): Promise; /** * shortcut for `tg.api.promoteChatMember` */ promoteChatMember(user: number, params?: { is_anonymous?: boolean; can_manage_chat?: boolean; can_delete_messages?: boolean; can_manage_video_chats?: boolean; can_restrict_members?: boolean; can_promote_members?: boolean; can_change_info?: boolean; can_invite_users?: boolean; can_post_stories?: boolean; can_edit_stories?: boolean; can_delete_stories?: boolean; can_post_messages?: boolean; can_edit_messages?: boolean; can_pin_messages?: boolean; can_manage_topics?: boolean; can_manage_direct_messages?: boolean; can_manage_tags?: boolean; can_send_welcome_messages?: boolean; }): Promise; /** * shortcut for `tg.api.readBusinessMessage` */ readBusinessMessage(messageId: number, params: { business_connection_id: string; }): Promise; /** * shortcut for `tg.api.removeChatVerification` */ removeChatVerification(params?: {}): Promise; /** * shortcut for `tg.api.reopenForumTopic` */ reopenForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.reopenGeneralForumTopic` */ reopenGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.restrictChatMember` */ restrictChatMember(user: number, permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; until_date?: number; }): Promise; /** * shortcut for `tg.api.revokeChatInviteLink` */ revokeChatInviteLink(inviteLink: string, params?: {}): Promise; /** * shortcut for `tg.api.sendAnimation` */ sendAnimation(animation: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendAudio` */ sendAudio(audio: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendChatAction` */ sendChatAction(action: string, params?: { business_connection_id?: string; message_thread_id?: number; }): Promise; /** * shortcut for `tg.api.sendChecklist` */ sendChecklist(checklist: TelegramInputChecklist, params: { business_connection_id: string; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendContact` */ sendContact(phoneNumber: string, firstName: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDice` */ sendDice(params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDocument` */ sendDocument(document: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendGame` */ sendGame(gameShortName: string, params?: { business_connection_id?: string; message_thread_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendGift` */ sendGift(giftId: string, params?: { user_id?: number; pay_for_upgrade?: boolean; text?: string | Formattable; text_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); text_entities?: TelegramMessageEntity[]; }): Promise; /** * shortcut for `tg.api.sendInvoice` */ sendInvoice(params: { message_thread_id?: number; direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendLivePhoto` */ sendLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendLocation` */ sendLocation(latitude: number, longitude: number, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMediaGroup` */ sendMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * shortcut for `tg.api.sendMessage` */ send(text: string | Formattable, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendMessageDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendPaidMedia` */ sendPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPhoto` */ sendPhoto(photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPoll` */ sendPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { business_connection_id?: string; message_thread_id?: number; question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichMessageDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendSticker` */ sendSticker(sticker: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVenue` */ sendVenue(latitude: number, longitude: number, title: string, address: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideo` */ sendVideo(video: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideoNote` */ sendVideoNote(videoNote: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVoice` */ sendVoice(voice: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.setChatAdministratorCustomTitle` */ setChatAdministratorCustomTitle(user: number, customTitle: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatDescription` */ setChatDescription(params?: { description?: string; }): Promise; /** * shortcut for `tg.api.setChatMemberTag` */ setChatMemberTag(user: number, params?: { tag?: string; }): Promise; /** * shortcut for `tg.api.setChatMenuButton` */ setChatMenuButton(params?: { menu_button?: TelegramMenuButton; }): Promise; /** * shortcut for `tg.api.setChatPermissions` */ setChatPermissions(permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; }): Promise; /** * shortcut for `tg.api.setChatPhoto` */ setChatPhoto(photo: TelegramInputFile, params?: {}): Promise; /** * shortcut for `tg.api.setChatStickerSet` */ setChatStickerSet(stickerSetName: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatTitle` */ setChatTitle(title: string, params?: {}): Promise; /** * shortcut for `tg.api.setGameScore` */ setGameScore(user: number, score: number, params?: { force?: boolean; disable_edit_message?: boolean; message_id?: number; inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.setMessageReaction` */ setMessageReaction(messageId: number, reactions: TelegramReactionType[], params?: { is_big?: boolean; }): Promise; /** * shortcut for `tg.api.stopMessageLiveLocation` */ stopLiveLocation(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.stopPoll` */ stopPoll(messageId: number, params?: { business_connection_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.unbanChatMember` */ unbanChatMember(user: number, params?: { only_if_banned?: boolean; }): Promise; /** * shortcut for `tg.api.unbanChatSenderChat` */ unbanChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.unhideGeneralForumTopic` */ unhideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllChatMessages` */ unpinAllChatMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllForumTopicMessages` */ unpinAllForumTopicMessages(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.unpinAllGeneralForumTopicMessages` */ unpinAllGeneralForumTopicMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinChatMessage` */ unpin(messageId: number, params?: { business_connection_id?: string; }): Promise; /** * shortcut for `tg.api.verifyChat` */ verifyChat(params?: { custom_description?: string; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRich(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `my_chat_member` event */ export declare class MyChatMemberUpdate extends ChatMemberUpdatedShared { readonly kind: "my_chat_member"; private __brand; } /** * update for the `chat_member` event */ export declare class ChatMemberUpdate extends ChatMemberUpdatedShared { readonly kind: "chat_member"; private __brand; } /** * update for the `chat_join_request` event */ export declare class ChatJoinRequestUpdate { raw: TelegramChatJoinRequest; readonly tg: TelegramLike; readonly kind: "chat_join_request"; private _chat?; private _from?; private _inviteLink?; constructor(raw: TelegramChatJoinRequest, tg: TelegramLike); /** * Chat to which the request was sent */ get chat(): Chat; /** * User that sent the join request */ get from(): User; /** * Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user. */ get userChatId(): number; /** * Date the request was sent in Unix time */ get date(): number; /** * Optional. Bio of the user */ get bio(): string | undefined; /** * Optional. Chat invite link that was used by the user to send the join request */ get inviteLink(): ChatInviteLink | undefined; /** * Optional. Identifier of the join request query; for bots assigned to process join requests only. If present, then the bot must call sendChatJoinRequestWebApp or directly call answerChatJoinRequestQuery within 10 seconds. */ get queryId(): string | undefined; /** * true if `bio` is set */ hasBio(): this is this & { bio: string; }; /** * true if `invite_link` is set */ hasInviteLink(): this is this & { inviteLink: ChatInviteLink; }; /** * true if `query_id` is set */ hasQueryId(): this is this & { queryId: string; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * approve this join request */ approve(): Promise; /** * decline this join request */ decline(): Promise; /** * shortcut for `from.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.answerChatJoinRequestQuery` */ answer(result: "approve" | "decline" | "queue", params?: {}): Promise; /** * shortcut for `tg.api.approveChatJoinRequest` */ approveChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.approveSuggestedPost` */ approveSuggestedPost(messageId: number, params?: { send_date?: number; }): Promise; /** * shortcut for `tg.api.banChatMember` */ banChatMember(user: number, params?: { until_date?: number; revoke_messages?: boolean; }): Promise; /** * shortcut for `tg.api.banChatSenderChat` */ banChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.closeForumTopic` */ closeForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.closeGeneralForumTopic` */ closeGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.copyMessage` */ copy(from: number | string, messageId: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.copyMessages` */ copyMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; remove_caption?: boolean; }): Promise; /** * shortcut for `tg.api.createChatInviteLink` */ createChatInviteLink(params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.createChatSubscriptionInviteLink` */ createChatSubscriptionInviteLink(subscriptionPeriod: number, subscriptionPrice: number, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.createForumTopic` */ createForumTopic(name: string, params?: { icon_color?: number; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.declineChatJoinRequest` */ declineChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.declineSuggestedPost` */ declineSuggestedPost(messageId: number, params?: { comment?: string; }): Promise; /** * shortcut for `tg.api.deleteAllMessageReactions` */ deleteAllMessageReactions(params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteChatPhoto` */ deleteChatPhoto(params?: {}): Promise; /** * shortcut for `tg.api.deleteChatStickerSet` */ deleteChatStickerSet(params?: {}): Promise; /** * shortcut for `tg.api.deleteEphemeralMessage` */ deleteEphemeralMessage(params: { receiver_user_id: number; ephemeral_message_id: number; }): Promise; /** * shortcut for `tg.api.deleteForumTopic` */ deleteForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.deleteMessage` */ delete(messageId: number, params?: {}): Promise; /** * shortcut for `tg.api.deleteMessageReaction` */ deleteMessageReaction(messageId: number, params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteMessages` */ deleteMany(messageIds: number[], params?: {}): Promise; /** * shortcut for `tg.api.editChatInviteLink` */ editChatInviteLink(inviteLink: string, params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.editChatSubscriptionInviteLink` */ editChatSubscriptionInviteLink(inviteLink: string, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageCaption` */ editEphemeralMessageCaption(params: { receiver_user_id: number; ephemeral_message_id: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageMedia` */ editEphemeralMessageMedia(params: { receiver_user_id: number; ephemeral_message_id: number; media: TelegramInputMedia; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageReplyMarkup` */ editEphemeralMessageReplyMarkup(params: { receiver_user_id: number; ephemeral_message_id: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageText` */ editEphemeralMessageText(params: { receiver_user_id: number; ephemeral_message_id: number; text?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; rich_message?: TelegramInputRichMessage; link_preview_options?: TelegramLinkPreviewOptions; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editForumTopic` */ editForumTopic(threadId: number, params?: { name?: string; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.editGeneralForumTopic` */ editGeneralForumTopic(name: string, params?: {}): Promise; /** * shortcut for `tg.api.editMessageCaption` */ editCaption(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageChecklist` */ editMessageChecklist(messageId: number, checklist: TelegramInputChecklist, params: { business_connection_id: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageLiveLocation` */ editLiveLocation(latitude: number, longitude: number, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; live_period?: number; horizontal_accuracy?: number; heading?: number; proximity_alert_radius?: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageMedia` */ editMedia(media: TelegramInputMedia, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageReplyMarkup` */ editReplyMarkup(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageText` */ edit(text: string | Formattable, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; rich_message?: TelegramInputRichMessage; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.exportChatInviteLink` */ exportChatInviteLink(params?: {}): Promise; /** * shortcut for `tg.api.forwardMessage` */ forward(from: number | string, messageId: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; }): Promise; /** * shortcut for `tg.api.forwardMessages` */ forwardMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; }): Promise; /** * shortcut for `tg.api.getChat` */ getChat(params?: {}): Promise; /** * shortcut for `tg.api.getChatAdministrators` */ getChatAdministrators(params?: { return_bots?: boolean; }): Promise<(import("./types.js").TelegramChatMemberOwner | import("./types.js").TelegramChatMemberAdministrator)[]>; /** * shortcut for `tg.api.getChatGifts` */ getChatGifts(params?: { exclude_unsaved?: boolean; exclude_saved?: boolean; exclude_unlimited?: boolean; exclude_limited_upgradable?: boolean; exclude_limited_non_upgradable?: boolean; exclude_from_blockchain?: boolean; exclude_unique?: boolean; sort_by_price?: boolean; offset?: string; limit?: number; }): Promise; /** * shortcut for `tg.api.getChatMember` */ getChatMember(user: number, params?: {}): Promise; /** * shortcut for `tg.api.getChatMemberCount` */ getChatMemberCount(params?: {}): Promise; /** * shortcut for `tg.api.getChatMenuButton` */ getChatMenuButton(params?: {}): Promise; /** * shortcut for `tg.api.getGameHighScores` */ getGameHighScores(user: number, params?: { message_id?: number; inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.getUserChatBoosts` */ getUserChatBoosts(user: number, params?: {}): Promise; /** * shortcut for `tg.api.hideGeneralForumTopic` */ hideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.leaveChat` */ leaveChat(params?: {}): Promise; /** * shortcut for `tg.api.pinChatMessage` */ pin(messageId: number, params?: { business_connection_id?: string; disable_notification?: boolean; }): Promise; /** * shortcut for `tg.api.promoteChatMember` */ promoteChatMember(user: number, params?: { is_anonymous?: boolean; can_manage_chat?: boolean; can_delete_messages?: boolean; can_manage_video_chats?: boolean; can_restrict_members?: boolean; can_promote_members?: boolean; can_change_info?: boolean; can_invite_users?: boolean; can_post_stories?: boolean; can_edit_stories?: boolean; can_delete_stories?: boolean; can_post_messages?: boolean; can_edit_messages?: boolean; can_pin_messages?: boolean; can_manage_topics?: boolean; can_manage_direct_messages?: boolean; can_manage_tags?: boolean; can_send_welcome_messages?: boolean; }): Promise; /** * shortcut for `tg.api.readBusinessMessage` */ readBusinessMessage(messageId: number, params: { business_connection_id: string; }): Promise; /** * shortcut for `tg.api.removeChatVerification` */ removeChatVerification(params?: {}): Promise; /** * shortcut for `tg.api.reopenForumTopic` */ reopenForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.reopenGeneralForumTopic` */ reopenGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.restrictChatMember` */ restrictChatMember(user: number, permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; until_date?: number; }): Promise; /** * shortcut for `tg.api.revokeChatInviteLink` */ revokeChatInviteLink(inviteLink: string, params?: {}): Promise; /** * shortcut for `tg.api.sendAnimation` */ sendAnimation(animation: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendAudio` */ sendAudio(audio: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendChatAction` */ sendChatAction(action: string, params?: { business_connection_id?: string; message_thread_id?: number; }): Promise; /** * shortcut for `tg.api.sendChatJoinRequestWebApp` */ sendChatJoinRequestWebApp(webAppUrl: string, params?: {}): Promise; /** * shortcut for `tg.api.sendChecklist` */ sendChecklist(checklist: TelegramInputChecklist, params: { business_connection_id: string; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendContact` */ sendContact(phoneNumber: string, firstName: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDice` */ sendDice(params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDocument` */ sendDocument(document: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendGame` */ sendGame(gameShortName: string, params?: { business_connection_id?: string; message_thread_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendGift` */ sendGift(giftId: string, params?: { user_id?: number; pay_for_upgrade?: boolean; text?: string | Formattable; text_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); text_entities?: TelegramMessageEntity[]; }): Promise; /** * shortcut for `tg.api.sendInvoice` */ sendInvoice(params: { message_thread_id?: number; direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendLivePhoto` */ sendLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendLocation` */ sendLocation(latitude: number, longitude: number, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMediaGroup` */ sendMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * shortcut for `tg.api.sendMessage` */ send(text: string | Formattable, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendMessageDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendPaidMedia` */ sendPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPhoto` */ sendPhoto(photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPoll` */ sendPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { business_connection_id?: string; message_thread_id?: number; question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichMessageDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendSticker` */ sendSticker(sticker: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVenue` */ sendVenue(latitude: number, longitude: number, title: string, address: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideo` */ sendVideo(video: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideoNote` */ sendVideoNote(videoNote: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVoice` */ sendVoice(voice: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.setChatAdministratorCustomTitle` */ setChatAdministratorCustomTitle(user: number, customTitle: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatDescription` */ setChatDescription(params?: { description?: string; }): Promise; /** * shortcut for `tg.api.setChatMemberTag` */ setChatMemberTag(user: number, params?: { tag?: string; }): Promise; /** * shortcut for `tg.api.setChatMenuButton` */ setChatMenuButton(params?: { menu_button?: TelegramMenuButton; }): Promise; /** * shortcut for `tg.api.setChatPermissions` */ setChatPermissions(permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; }): Promise; /** * shortcut for `tg.api.setChatPhoto` */ setChatPhoto(photo: TelegramInputFile, params?: {}): Promise; /** * shortcut for `tg.api.setChatStickerSet` */ setChatStickerSet(stickerSetName: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatTitle` */ setChatTitle(title: string, params?: {}): Promise; /** * shortcut for `tg.api.setGameScore` */ setGameScore(user: number, score: number, params?: { force?: boolean; disable_edit_message?: boolean; message_id?: number; inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.setMessageReaction` */ setMessageReaction(messageId: number, reactions: TelegramReactionType[], params?: { is_big?: boolean; }): Promise; /** * shortcut for `tg.api.stopMessageLiveLocation` */ stopLiveLocation(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.stopPoll` */ stopPoll(messageId: number, params?: { business_connection_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.unbanChatMember` */ unbanChatMember(user: number, params?: { only_if_banned?: boolean; }): Promise; /** * shortcut for `tg.api.unbanChatSenderChat` */ unbanChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.unhideGeneralForumTopic` */ unhideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllChatMessages` */ unpinAllChatMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllForumTopicMessages` */ unpinAllForumTopicMessages(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.unpinAllGeneralForumTopicMessages` */ unpinAllGeneralForumTopicMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinChatMessage` */ unpin(messageId: number, params?: { business_connection_id?: string; }): Promise; /** * shortcut for `tg.api.verifyChat` */ verifyChat(params?: { custom_description?: string; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRich(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `chat_boost` event */ export declare class ChatBoostUpdate { raw: TelegramChatBoostUpdated; readonly tg: TelegramLike; readonly kind: "chat_boost"; private _chat?; private _boost?; constructor(raw: TelegramChatBoostUpdated, tg: TelegramLike); /** * Chat which was boosted */ get chat(): Chat; /** * Information about the chat boost */ get boost(): ChatBoost; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `removed_chat_boost` event */ export declare class RemovedChatBoostUpdate { raw: TelegramChatBoostRemoved; readonly tg: TelegramLike; readonly kind: "removed_chat_boost"; private _chat?; constructor(raw: TelegramChatBoostRemoved, tg: TelegramLike); /** * Chat which was boosted */ get chat(): Chat; /** * Unique identifier of the boost */ get boostId(): string; /** * Point in time (Unix timestamp) when the boost was removed */ get removeDate(): number; /** * Source of the removed boost */ get source(): TelegramChatBoostSource; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `managed_bot` event */ export declare class ManagedBotUpdate { raw: TelegramManagedBotUpdated; readonly tg: TelegramLike; readonly kind: "managed_bot"; private _user?; private _bot?; constructor(raw: TelegramManagedBotUpdated, tg: TelegramLike); /** * User that created the bot */ get user(): User; /** * Information about the bot. Token of the bot can be fetched using the method getManagedBotToken. */ get bot(): User; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `user.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `subscription` event */ export declare class SubscriptionUpdate { raw: TelegramBotSubscriptionUpdated; readonly tg: TelegramLike; readonly kind: "subscription"; private _user?; constructor(raw: TelegramBotSubscriptionUpdated, tg: TelegramLike); /** * User who subscribed for payments toward the bot */ get user(): User; /** * Bot-specified invoice payload */ get invoicePayload(): string; /** * The new state of the subscription. Currently, it can be one of “canceled” if the user canceled the subscription, “active” if the user re-enabled a previously canceled subscription, or “failed” if payment for the subscription failed. */ get state(): "canceled" | "active" | "failed"; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; /** * shortcut for `user.id` — uniform sender id across update kinds */ get senderId(): number; is(kind: K): this is UpdateKindMap[K]; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `stopped_message_generation` event */ export declare class StoppedMessageGenerationUpdate { raw: TelegramMessageGenerationStopped; readonly tg: TelegramLike; readonly kind: "stopped_message_generation"; private _chat?; constructor(raw: TelegramMessageGenerationStopped, tg: TelegramLike); /** * Chat in which the message is generated */ get chat(): Chat; /** * Optional. Unique identifier of the message thread in which the message is generated */ get messageThreadId(): number | undefined; /** * Unique identifier of the message draft which was stopped */ get draftId(): number; /** * true if `message_thread_id` is set */ hasMessageThreadId(): this is this & { messageThreadId: number; thread: MessageGenerationStoppedThreadShortcuts; }; /** * shortcut for `tg.api` — call any bot api method directly from the wrapped update */ get api(): TelegramLike["api"]; is(kind: K): this is UpdateKindMap[K]; /** * shortcut for `tg.api.approveChatJoinRequest` */ approveChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.approveSuggestedPost` */ approveSuggestedPost(messageId: number, params?: { send_date?: number; }): Promise; /** * shortcut for `tg.api.banChatMember` */ banChatMember(user: number, params?: { until_date?: number; revoke_messages?: boolean; }): Promise; /** * shortcut for `tg.api.banChatSenderChat` */ banChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.closeForumTopic` */ closeForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.closeGeneralForumTopic` */ closeGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.copyMessage` */ copy(from: number | string, messageId: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.copyMessages` */ copyMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; remove_caption?: boolean; }): Promise; /** * shortcut for `tg.api.createChatInviteLink` */ createChatInviteLink(params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.createChatSubscriptionInviteLink` */ createChatSubscriptionInviteLink(subscriptionPeriod: number, subscriptionPrice: number, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.createForumTopic` */ createForumTopic(name: string, params?: { icon_color?: number; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.declineChatJoinRequest` */ declineChatJoinRequest(user: number, params?: {}): Promise; /** * shortcut for `tg.api.declineSuggestedPost` */ declineSuggestedPost(messageId: number, params?: { comment?: string; }): Promise; /** * shortcut for `tg.api.deleteAllMessageReactions` */ deleteAllMessageReactions(params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteChatPhoto` */ deleteChatPhoto(params?: {}): Promise; /** * shortcut for `tg.api.deleteChatStickerSet` */ deleteChatStickerSet(params?: {}): Promise; /** * shortcut for `tg.api.deleteEphemeralMessage` */ deleteEphemeralMessage(params: { receiver_user_id: number; ephemeral_message_id: number; }): Promise; /** * shortcut for `tg.api.deleteForumTopic` */ deleteForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.deleteMessage` */ delete(messageId: number, params?: {}): Promise; /** * shortcut for `tg.api.deleteMessageReaction` */ deleteMessageReaction(messageId: number, params?: { user_id?: number; actor_chat_id?: number; }): Promise; /** * shortcut for `tg.api.deleteMessages` */ deleteMany(messageIds: number[], params?: {}): Promise; /** * shortcut for `tg.api.editChatInviteLink` */ editChatInviteLink(inviteLink: string, params?: { name?: string; expire_date?: number; member_limit?: number; creates_join_request?: boolean; }): Promise; /** * shortcut for `tg.api.editChatSubscriptionInviteLink` */ editChatSubscriptionInviteLink(inviteLink: string, params?: { name?: string; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageCaption` */ editEphemeralMessageCaption(params: { receiver_user_id: number; ephemeral_message_id: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageMedia` */ editEphemeralMessageMedia(params: { receiver_user_id: number; ephemeral_message_id: number; media: TelegramInputMedia; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageReplyMarkup` */ editEphemeralMessageReplyMarkup(params: { receiver_user_id: number; ephemeral_message_id: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editEphemeralMessageText` */ editEphemeralMessageText(params: { receiver_user_id: number; ephemeral_message_id: number; text?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; rich_message?: TelegramInputRichMessage; link_preview_options?: TelegramLinkPreviewOptions; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editForumTopic` */ editForumTopic(threadId: number, params?: { name?: string; icon_custom_emoji_id?: string; }): Promise; /** * shortcut for `tg.api.editGeneralForumTopic` */ editGeneralForumTopic(name: string, params?: {}): Promise; /** * shortcut for `tg.api.editMessageCaption` */ editCaption(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageChecklist` */ editMessageChecklist(messageId: number, checklist: TelegramInputChecklist, params: { business_connection_id: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageLiveLocation` */ editLiveLocation(latitude: number, longitude: number, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; live_period?: number; horizontal_accuracy?: number; heading?: number; proximity_alert_radius?: number; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageMedia` */ editMedia(media: TelegramInputMedia, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageReplyMarkup` */ editReplyMarkup(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.editMessageText` */ edit(text: string | Formattable, params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; rich_message?: TelegramInputRichMessage; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.exportChatInviteLink` */ exportChatInviteLink(params?: {}): Promise; /** * shortcut for `tg.api.forwardMessage` */ forward(from: number | string, messageId: number, params?: { message_thread_id?: number; direct_messages_topic_id?: number; video_start_timestamp?: number; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; }): Promise; /** * shortcut for `tg.api.forwardMessages` */ forwardMany(from: number | string, messageIds: number[], params?: { message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; }): Promise; /** * shortcut for `tg.api.getChat` */ getChat(params?: {}): Promise; /** * shortcut for `tg.api.getChatAdministrators` */ getChatAdministrators(params?: { return_bots?: boolean; }): Promise<(import("./types.js").TelegramChatMemberOwner | import("./types.js").TelegramChatMemberAdministrator)[]>; /** * shortcut for `tg.api.getChatGifts` */ getChatGifts(params?: { exclude_unsaved?: boolean; exclude_saved?: boolean; exclude_unlimited?: boolean; exclude_limited_upgradable?: boolean; exclude_limited_non_upgradable?: boolean; exclude_from_blockchain?: boolean; exclude_unique?: boolean; sort_by_price?: boolean; offset?: string; limit?: number; }): Promise; /** * shortcut for `tg.api.getChatMember` */ getChatMember(user: number, params?: {}): Promise; /** * shortcut for `tg.api.getChatMemberCount` */ getChatMemberCount(params?: {}): Promise; /** * shortcut for `tg.api.getChatMenuButton` */ getChatMenuButton(params?: {}): Promise; /** * shortcut for `tg.api.getGameHighScores` */ getGameHighScores(user: number, params?: { message_id?: number; inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.getUserChatBoosts` */ getUserChatBoosts(user: number, params?: {}): Promise; /** * shortcut for `tg.api.hideGeneralForumTopic` */ hideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.leaveChat` */ leaveChat(params?: {}): Promise; /** * shortcut for `tg.api.pinChatMessage` */ pin(messageId: number, params?: { business_connection_id?: string; disable_notification?: boolean; }): Promise; /** * shortcut for `tg.api.promoteChatMember` */ promoteChatMember(user: number, params?: { is_anonymous?: boolean; can_manage_chat?: boolean; can_delete_messages?: boolean; can_manage_video_chats?: boolean; can_restrict_members?: boolean; can_promote_members?: boolean; can_change_info?: boolean; can_invite_users?: boolean; can_post_stories?: boolean; can_edit_stories?: boolean; can_delete_stories?: boolean; can_post_messages?: boolean; can_edit_messages?: boolean; can_pin_messages?: boolean; can_manage_topics?: boolean; can_manage_direct_messages?: boolean; can_manage_tags?: boolean; can_send_welcome_messages?: boolean; }): Promise; /** * shortcut for `tg.api.readBusinessMessage` */ readBusinessMessage(messageId: number, params: { business_connection_id: string; }): Promise; /** * shortcut for `tg.api.removeChatVerification` */ removeChatVerification(params?: {}): Promise; /** * shortcut for `tg.api.reopenForumTopic` */ reopenForumTopic(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.reopenGeneralForumTopic` */ reopenGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.restrictChatMember` */ restrictChatMember(user: number, permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; until_date?: number; }): Promise; /** * shortcut for `tg.api.revokeChatInviteLink` */ revokeChatInviteLink(inviteLink: string, params?: {}): Promise; /** * shortcut for `tg.api.sendAnimation` */ sendAnimation(animation: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendAudio` */ sendAudio(audio: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; performer?: string; title?: string; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendChatAction` */ sendChatAction(action: string, params?: { business_connection_id?: string; message_thread_id?: number; }): Promise; /** * shortcut for `tg.api.sendChecklist` */ sendChecklist(checklist: TelegramInputChecklist, params: { business_connection_id: string; disable_notification?: boolean; protect_content?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendContact` */ sendContact(phoneNumber: string, firstName: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; last_name?: string; vcard?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDice` */ sendDice(params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendDocument` */ sendDocument(document: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; thumbnail?: TelegramInputFile | string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; disable_content_type_detection?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendGame` */ sendGame(gameShortName: string, params?: { business_connection_id?: string; message_thread_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendGift` */ sendGift(giftId: string, params?: { user_id?: number; pay_for_upgrade?: boolean; text?: string | Formattable; text_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); text_entities?: TelegramMessageEntity[]; }): Promise; /** * shortcut for `tg.api.sendInvoice` */ sendInvoice(params: { message_thread_id?: number; direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: TelegramLabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.sendLivePhoto` */ sendLivePhoto(livePhoto: TelegramInputFile | string, photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendLocation` */ sendLocation(latitude: number, longitude: number, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; horizontal_accuracy?: number; live_period?: number; heading?: number; proximity_alert_radius?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMediaGroup` */ sendMediaGroup(media: (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaLivePhoto | TelegramInputMediaPhoto | TelegramInputMediaVideo)[], params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; }): Promise; /** * shortcut for `tg.api.sendMessage` */ send(text: string | Formattable, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; link_preview_options?: TelegramLinkPreviewOptions; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendMessageDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendPaidMedia` */ sendPaidMedia(starCount: number, media: TelegramInputPaidMedia[], params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; payload?: string; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPhoto` */ sendPhoto(photo: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendPoll` */ sendPoll(question: string | Formattable, options: TelegramInputPollOption[], params?: { business_connection_id?: string; message_thread_id?: number; question_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); question_entities?: TelegramMessageEntity[]; is_anonymous?: boolean; type?: string; allows_multiple_answers?: boolean; allows_revoting?: boolean; shuffle_options?: boolean; allow_adding_options?: boolean; hide_results_until_closes?: boolean; members_only?: boolean; country_codes?: string[]; correct_option_ids?: number[]; explanation?: string | Formattable; explanation_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); explanation_entities?: TelegramMessageEntity[]; explanation_media?: TelegramInputPollMedia; open_period?: number; close_date?: number; is_closed?: boolean; description?: string | Formattable; description_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); description_entities?: TelegramMessageEntity[]; media?: TelegramInputPollMedia; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRichMessage(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichMessageDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendSticker` */ sendSticker(sticker: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; emoji?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVenue` */ sendVenue(latitude: number, longitude: number, title: string, address: string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; foursquare_id?: string; foursquare_type?: string; google_place_id?: string; google_place_type?: string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideo` */ sendVideo(video: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; width?: number; height?: number; thumbnail?: TelegramInputFile | string; cover?: TelegramInputFile | string; start_timestamp?: number; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; show_caption_above_media?: boolean; has_spoiler?: boolean; supports_streaming?: boolean; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVideoNote` */ sendVideoNote(videoNote: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; duration?: number; length?: number; thumbnail?: TelegramInputFile | string; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendVoice` */ sendVoice(voice: TelegramInputFile | string, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; caption?: string | Formattable; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); caption_entities?: TelegramMessageEntity[]; duration?: number; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.setChatAdministratorCustomTitle` */ setChatAdministratorCustomTitle(user: number, customTitle: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatDescription` */ setChatDescription(params?: { description?: string; }): Promise; /** * shortcut for `tg.api.setChatMemberTag` */ setChatMemberTag(user: number, params?: { tag?: string; }): Promise; /** * shortcut for `tg.api.setChatMenuButton` */ setChatMenuButton(params?: { menu_button?: TelegramMenuButton; }): Promise; /** * shortcut for `tg.api.setChatPermissions` */ setChatPermissions(permissions: TelegramChatPermissions, params?: { use_independent_chat_permissions?: boolean; }): Promise; /** * shortcut for `tg.api.setChatPhoto` */ setChatPhoto(photo: TelegramInputFile, params?: {}): Promise; /** * shortcut for `tg.api.setChatStickerSet` */ setChatStickerSet(stickerSetName: string, params?: {}): Promise; /** * shortcut for `tg.api.setChatTitle` */ setChatTitle(title: string, params?: {}): Promise; /** * shortcut for `tg.api.setGameScore` */ setGameScore(user: number, score: number, params?: { force?: boolean; disable_edit_message?: boolean; message_id?: number; inline_message_id?: string; }): Promise; /** * shortcut for `tg.api.setMessageReaction` */ setMessageReaction(messageId: number, reactions: TelegramReactionType[], params?: { is_big?: boolean; }): Promise; /** * shortcut for `tg.api.stopMessageLiveLocation` */ stopLiveLocation(params?: { business_connection_id?: string; message_id?: number; inline_message_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.stopPoll` */ stopPoll(messageId: number, params?: { business_connection_id?: string; reply_markup?: TelegramInlineKeyboardMarkup | { toJSON: () => TelegramInlineKeyboardMarkup; }; }): Promise; /** * shortcut for `tg.api.unbanChatMember` */ unbanChatMember(user: number, params?: { only_if_banned?: boolean; }): Promise; /** * shortcut for `tg.api.unbanChatSenderChat` */ unbanChatSenderChat(senderChat: number, params?: {}): Promise; /** * shortcut for `tg.api.unhideGeneralForumTopic` */ unhideGeneralForumTopic(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllChatMessages` */ unpinAllChatMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinAllForumTopicMessages` */ unpinAllForumTopicMessages(threadId: number, params?: {}): Promise; /** * shortcut for `tg.api.unpinAllGeneralForumTopicMessages` */ unpinAllGeneralForumTopicMessages(params?: {}): Promise; /** * shortcut for `tg.api.unpinChatMessage` */ unpin(messageId: number, params?: { business_connection_id?: string; }): Promise; /** * shortcut for `tg.api.verifyChat` */ verifyChat(params?: { custom_description?: string; }): Promise; /** * shortcut for `tg.api.sendMessageDraft` */ sendDraft(draftId: number, text: string | Formattable, params?: { message_thread_id?: number; parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); entities?: TelegramMessageEntity[]; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * shortcut for `tg.api.sendRichMessage` */ sendRich(richMessage: TelegramInputRichMessage | RichLike, params?: { business_connection_id?: string; message_thread_id?: number; direct_messages_topic_id?: number; ephemeral_message_parameters?: TelegramEphemeralMessageParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; suggested_post_parameters?: TelegramSuggestedPostParameters; reply_parameters?: TelegramReplyParameters; reply_markup?: (TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply) | { toJSON: () => TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply; }; }): Promise; /** * shortcut for `tg.api.sendRichMessageDraft` */ sendRichDraft(draftId: number, richMessage: TelegramInputRichMessage | RichLike, params?: { message_thread_id?: number; can_stop?: boolean; keep_on_stop?: boolean; }): Promise; /** * thread-scoped shortcuts — auto-fill `message_thread_id` on every call. `undefined` when this message is not in a thread / forum topic */ get thread(): MessageGenerationStoppedThreadShortcuts | undefined; [INSPECT](depth: any, options: any, inspect: any): string; } /** * update for the `new_chat_members` event */ export declare class NewChatMembersUpdate extends MessageShared { readonly kind: "new_chat_members"; private __brand; } /** * update for the `left_chat_member` event */ export declare class LeftChatMemberUpdate extends MessageShared { readonly kind: "left_chat_member"; private __brand; } /** * update for the `new_chat_title` event */ export declare class NewChatTitleUpdate extends MessageShared { readonly kind: "new_chat_title"; private __brand; } /** * update for the `new_chat_photo` event */ export declare class NewChatPhotoUpdate extends MessageShared { readonly kind: "new_chat_photo"; private __brand; } /** * update for the `delete_chat_photo` event */ export declare class DeleteChatPhotoUpdate extends MessageShared { readonly kind: "delete_chat_photo"; private __brand; } /** * update for the `group_chat_created` event */ export declare class GroupChatCreatedUpdate extends MessageShared { readonly kind: "group_chat_created"; private __brand; } /** * update for the `pinned_message` event */ export declare class PinnedMessageUpdate extends MessageShared { readonly kind: "pinned_message"; private __brand; } /** * update for the `invoice` event */ export declare class InvoiceUpdate extends MessageShared { readonly kind: "invoice"; private __brand; } /** * update for the `successful_payment` event */ export declare class SuccessfulPaymentUpdate extends MessageShared { readonly kind: "successful_payment"; private __brand; } /** * update for the `users_shared` event */ export declare class UsersSharedUpdate extends MessageShared { readonly kind: "users_shared"; private __brand; } /** * update for the `chat_shared` event */ export declare class ChatSharedUpdate extends MessageShared { readonly kind: "chat_shared"; private __brand; } /** * update for the `web_app_data` event */ export declare class WebAppDataUpdate extends MessageShared { readonly kind: "web_app_data"; private __brand; } /** * update for the `video_chat_scheduled` event */ export declare class VideoChatScheduledUpdate extends MessageShared { readonly kind: "video_chat_scheduled"; private __brand; } /** * update for the `video_chat_started` event */ export declare class VideoChatStartedUpdate extends MessageShared { readonly kind: "video_chat_started"; private __brand; } /** * update for the `video_chat_ended` event */ export declare class VideoChatEndedUpdate extends MessageShared { readonly kind: "video_chat_ended"; private __brand; } /** * update for the `video_chat_participants_invited` event */ export declare class VideoChatParticipantsInvitedUpdate extends MessageShared { readonly kind: "video_chat_participants_invited"; private __brand; } /** * update for the `forum_topic_created` event */ export declare class ForumTopicCreatedUpdate extends MessageShared { readonly kind: "forum_topic_created"; private __brand; } /** * update for the `forum_topic_edited` event */ export declare class ForumTopicEditedUpdate extends MessageShared { readonly kind: "forum_topic_edited"; private __brand; } /** * update for the `forum_topic_closed` event */ export declare class ForumTopicClosedUpdate extends MessageShared { readonly kind: "forum_topic_closed"; private __brand; } /** * update for the `forum_topic_reopened` event */ export declare class ForumTopicReopenedUpdate extends MessageShared { readonly kind: "forum_topic_reopened"; private __brand; } /** * update for the `general_forum_topic_hidden` event */ export declare class GeneralForumTopicHiddenUpdate extends MessageShared { readonly kind: "general_forum_topic_hidden"; private __brand; } /** * update for the `general_forum_topic_unhidden` event */ export declare class GeneralForumTopicUnhiddenUpdate extends MessageShared { readonly kind: "general_forum_topic_unhidden"; private __brand; } /** * update for the `giveaway_created` event */ export declare class GiveawayCreatedUpdate extends MessageShared { readonly kind: "giveaway_created"; private __brand; } /** * update for the `giveaway_completed` event */ export declare class GiveawayCompletedUpdate extends MessageShared { readonly kind: "giveaway_completed"; private __brand; } /** * update for the `giveaway_winners` event */ export declare class GiveawayWinnersUpdate extends MessageShared { readonly kind: "giveaway_winners"; private __brand; } /** * update for the `boost_added` event */ export declare class BoostAddedUpdate extends MessageShared { readonly kind: "boost_added"; private __brand; } /** * update for the `message_auto_delete_timer_changed` event */ export declare class MessageAutoDeleteTimerChangedUpdate extends MessageShared { readonly kind: "message_auto_delete_timer_changed"; private __brand; } /** * update for the `migrate_to_chat_id` event */ export declare class MigrateToChatIdUpdate extends MessageShared { readonly kind: "migrate_to_chat_id"; private __brand; } /** * update for the `migrate_from_chat_id` event */ export declare class MigrateFromChatIdUpdate extends MessageShared { readonly kind: "migrate_from_chat_id"; private __brand; } /** * update for the `passport_data` event */ export declare class PassportDataUpdate extends MessageShared { readonly kind: "passport_data"; private __brand; } /** * update for the `proximity_alert_triggered` event */ export declare class ProximityAlertTriggeredUpdate extends MessageShared { readonly kind: "proximity_alert_triggered"; private __brand; } /** * update for the `write_access_allowed` event */ export declare class WriteAccessAllowedUpdate extends MessageShared { readonly kind: "write_access_allowed"; private __brand; } /** * update for the `community_chat_added` event */ export declare class CommunityChatAddedUpdate extends MessageShared { readonly kind: "community_chat_added"; private __brand; } /** * update for the `community_chat_removed` event */ export declare class CommunityChatRemovedUpdate extends MessageShared { readonly kind: "community_chat_removed"; private __brand; } export type UpdateKind = keyof UpdateKindMap; export interface UpdateKindMap { "message": MessageUpdate; "edited_message": EditedMessageUpdate; "channel_post": ChannelPostUpdate; "edited_channel_post": EditedChannelPostUpdate; "business_connection": BusinessConnectionUpdate; "business_message": BusinessMessageUpdate; "edited_business_message": EditedBusinessMessageUpdate; "deleted_business_messages": DeletedBusinessMessagesUpdate; "guest_message": GuestMessageUpdate; "message_reaction": MessageReactionUpdate; "message_reaction_count": MessageReactionCountUpdate; "inline_query": InlineQueryUpdate; "chosen_inline_result": ChosenInlineResultUpdate; "callback_query": CallbackQueryUpdate; "shipping_query": ShippingQueryUpdate; "pre_checkout_query": PreCheckoutQueryUpdate; "purchased_paid_media": PurchasedPaidMediaUpdate; "poll": PollUpdate; "poll_answer": PollAnswerUpdate; "my_chat_member": MyChatMemberUpdate; "chat_member": ChatMemberUpdate; "chat_join_request": ChatJoinRequestUpdate; "chat_boost": ChatBoostUpdate; "removed_chat_boost": RemovedChatBoostUpdate; "managed_bot": ManagedBotUpdate; "subscription": SubscriptionUpdate; "stopped_message_generation": StoppedMessageGenerationUpdate; "new_chat_members": NewChatMembersUpdate; "left_chat_member": LeftChatMemberUpdate; "new_chat_title": NewChatTitleUpdate; "new_chat_photo": NewChatPhotoUpdate; "delete_chat_photo": DeleteChatPhotoUpdate; "group_chat_created": GroupChatCreatedUpdate; "pinned_message": PinnedMessageUpdate; "invoice": InvoiceUpdate; "successful_payment": SuccessfulPaymentUpdate; "users_shared": UsersSharedUpdate; "chat_shared": ChatSharedUpdate; "web_app_data": WebAppDataUpdate; "video_chat_scheduled": VideoChatScheduledUpdate; "video_chat_started": VideoChatStartedUpdate; "video_chat_ended": VideoChatEndedUpdate; "video_chat_participants_invited": VideoChatParticipantsInvitedUpdate; "forum_topic_created": ForumTopicCreatedUpdate; "forum_topic_edited": ForumTopicEditedUpdate; "forum_topic_closed": ForumTopicClosedUpdate; "forum_topic_reopened": ForumTopicReopenedUpdate; "general_forum_topic_hidden": GeneralForumTopicHiddenUpdate; "general_forum_topic_unhidden": GeneralForumTopicUnhiddenUpdate; "giveaway_created": GiveawayCreatedUpdate; "giveaway_completed": GiveawayCompletedUpdate; "giveaway_winners": GiveawayWinnersUpdate; "boost_added": BoostAddedUpdate; "message_auto_delete_timer_changed": MessageAutoDeleteTimerChangedUpdate; "migrate_to_chat_id": MigrateToChatIdUpdate; "migrate_from_chat_id": MigrateFromChatIdUpdate; "passport_data": PassportDataUpdate; "proximity_alert_triggered": ProximityAlertTriggeredUpdate; "write_access_allowed": WriteAccessAllowedUpdate; "community_chat_added": CommunityChatAddedUpdate; "community_chat_removed": CommunityChatRemovedUpdate; } export type Update = MessageUpdate | EditedMessageUpdate | ChannelPostUpdate | EditedChannelPostUpdate | BusinessConnectionUpdate | BusinessMessageUpdate | EditedBusinessMessageUpdate | DeletedBusinessMessagesUpdate | GuestMessageUpdate | MessageReactionUpdate | MessageReactionCountUpdate | InlineQueryUpdate | ChosenInlineResultUpdate | CallbackQueryUpdate | ShippingQueryUpdate | PreCheckoutQueryUpdate | PurchasedPaidMediaUpdate | PollUpdate | PollAnswerUpdate | MyChatMemberUpdate | ChatMemberUpdate | ChatJoinRequestUpdate | ChatBoostUpdate | RemovedChatBoostUpdate | ManagedBotUpdate | SubscriptionUpdate | StoppedMessageGenerationUpdate | NewChatMembersUpdate | LeftChatMemberUpdate | NewChatTitleUpdate | NewChatPhotoUpdate | DeleteChatPhotoUpdate | GroupChatCreatedUpdate | PinnedMessageUpdate | InvoiceUpdate | SuccessfulPaymentUpdate | UsersSharedUpdate | ChatSharedUpdate | WebAppDataUpdate | VideoChatScheduledUpdate | VideoChatStartedUpdate | VideoChatEndedUpdate | VideoChatParticipantsInvitedUpdate | ForumTopicCreatedUpdate | ForumTopicEditedUpdate | ForumTopicClosedUpdate | ForumTopicReopenedUpdate | GeneralForumTopicHiddenUpdate | GeneralForumTopicUnhiddenUpdate | GiveawayCreatedUpdate | GiveawayCompletedUpdate | GiveawayWinnersUpdate | BoostAddedUpdate | MessageAutoDeleteTimerChangedUpdate | MigrateToChatIdUpdate | MigrateFromChatIdUpdate | PassportDataUpdate | ProximityAlertTriggeredUpdate | WriteAccessAllowedUpdate | CommunityChatAddedUpdate | CommunityChatRemovedUpdate; export declare const UPDATE_KINDS: readonly UpdateKind[]; export {}; //# sourceMappingURL=updates.d.ts.map