tgify.js - v1.3.0
    Preparing search index...

    Interface SceneContext<D>

    interface SceneContext<D extends SceneSessionData = SceneSessionData> {
        botInfo: UserFromGetMe;
        scene: SceneContextScene<SceneContext<D>, D>;
        session: SceneSession<D>;
        state: Record<string | symbol, any>;
        telegram: Telegram;
        update: Update;
        get businessMessage(): PropOr<U, "business_message">;
        get "businessСonnection"(): PropOr<U, "business_connection">;
        get callbackQuery(): PropOr<U, "callback_query">;
        get channelPost(): PropOr<U, "channel_post">;
        get chat(): PropOr<GetUpdateContent<U>, "chat">;
        get chatBoost(): PropOr<U, "chat_boost">;
        get chatJoinRequest(): PropOr<U, "chat_join_request">;
        get chatMember(): PropOr<U, "chat_member">;
        get chosenInlineResult(): PropOr<U, "chosen_inline_result">;
        get deletedBusinessMessages(): PropOr<U, "deleted_business_messages">;
        get editedBusinessMessage(): PropOr<U, "edited_business_message">;
        get editedChannelPost(): PropOr<U, "edited_channel_post">;
        get editedMessage(): PropOr<U, "edited_message">;
        get from(): GetUserFromAnySource<U>;
        get inlineMessageId(): string | undefined;
        get inlineQuery(): PropOr<U, "inline_query">;
        get kickChatMember(): (
            ...args: [
                userId: number,
                untilDate?: number,
                extra?: Omit<{}, "chat_id" | "user_id" | "until_date">,
            ],
        ) => Promise<true>;
        get me(): string;
        get message(): PropOr<U, "message">;
        get messageReaction(): PropOr<U, "message_reaction">;
        get messageReactionCount(): PropOr<U, "message_reaction_count">;
        get msg(): GetMsg<U> & Msg;
        get msgId(): GetMsgId<U>;
        get myChatMember(): PropOr<U, "my_chat_member">;
        get passportData(): PassportData | undefined;
        get poll(): PropOr<U, "poll">;
        get pollAnswer(): PropOr<U, "poll_answer">;
        get preCheckoutQuery(): PropOr<U, "pre_checkout_query">;
        get purchasedPaidMedia(): PropOr<U, "purchased_paid_media">;
        get reactions(): MessageReactions;
        get removedChatBoost(): PropOr<U, "removed_chat_boost">;
        get senderChat(): PropOr<GetUpdateContent<U>, "sender_chat", undefined>;
        get shippingQuery(): PropOr<U, "shipping_query">;
        get text(): GetText<U>;
        get tg(): Telegram;
        get updateType(): Extract<UnionKeys<U>, UpdateType>;
        get webAppData(): | {
            button_text: string;
            data: { json<T>(): T; text(): string };
        }
        | undefined;
        get webhookReply(): boolean;
        set webhookReply(enable: boolean): void;
        addStickerToSet(
            ...args: [
                name: string,
                stickerData: Omit<{}, "chat_id" | "name" | "user_id">,
            ],
        ): Promise<true>;
        answerCbQuery(
            ...args: [
                text?: string,
                extra?: Omit<{}, "text" | "chat_id" | "callback_query_id">,
            ],
        ): Promise<true>;
        answerGameQuery(...args: [url: string]): Promise<true>;
        answerInlineQuery(
            ...args: [
                results: readonly InlineQueryResult[],
                extra?: Omit<{}, "chat_id" | "inline_query_id" | "results">,
            ],
        ): Promise<true>;
        answerPreCheckoutQuery(
            ...args: [ok: boolean, errorMessage?: string],
        ): Promise<true>;
        answerShippingQuery(
            ...args: [
                ok: boolean,
                shippingOptions: readonly ShippingOption[],
                errorMessage: string,
            ],
        ): Promise<true>;
        approveChatJoinRequest(userId: number): Promise<true>;
        approveSuggestedPost(
            messageId: number,
            extra?: Omit<{}, "chat_id">,
        ): Promise<true>;
        banChatMember(
            ...args: [
                userId: number,
                untilDate?: number,
                extra?: Omit<{}, "chat_id" | "user_id" | "until_date">,
            ],
        ): Promise<true>;
        banChatSenderChat(senderChatId: number): Promise<true>;
        closeForumTopic(): Promise<true>;
        closeGeneralForumTopic(): Promise<true>;
        copyMessage(
            chatId: string | number,
            extra?: { caption?: string | FmtString<string> },
        ): Promise<MessageId>;
        copyMessages(
            chatId: string | number,
            messageIds: number[],
            extra?: Omit<{}, "chat_id" | "from_chat_id" | "message_ids">,
        ): Promise<MessageId[]>;
        createChatInviteLink(
            ...args: [extra?: Omit<{}, "chat_id">],
        ): Promise<ChatInviteLink>;
        createChatSubscriptionInviteLink(
            ...args: [
                subscriptionPrice: number,
                extra?: Omit<
                    {},
                    "chat_id"
                    | "subscription_period"
                    | "subscription_price",
                >,
            ],
        ): Promise<ChatInviteLink>;
        createForumTopic(
            ...args: [name: string, extra?: Omit<{}, "chat_id" | "name">],
        ): Promise<ForumTopic>;
        createNewStickerSet(
            ...args: [
                name: string,
                title: string,
                stickerData: Omit<{}, "chat_id" | "name" | "user_id" | "title">,
            ],
        ): Promise<true>;
        declineChatJoinRequest(userId: number): Promise<true>;
        declineSuggestedPost(
            messageId: number,
            extra?: Omit<{}, "chat_id">,
        ): Promise<true>;
        deleteChatPhoto(...args: []): Promise<true>;
        deleteChatStickerSet(): Promise<true>;
        deleteForumTopic(): Promise<true>;
        deleteMessage(messageId?: number): Promise<true>;
        deleteMessages(messageIds: number[]): Promise<true>;
        deleteStickerFromSet(sticker: string): Promise<true>;
        deleteStickerSet(...args: [name: string]): Promise<true>;
        editChatInviteLink(
            ...args: [
                inviteLink: string,
                extra?: Omit<{}, "chat_id" | "invite_link">,
            ],
        ): Promise<ChatInviteLink>;
        editChatSubscriptionInviteLink(
            ...args: [
                inviteLink: string,
                extra?: Omit<{}, "chat_id" | "invite_link">,
            ],
        ): Promise<ChatInviteLink>;
        editForumTopic(extra: ExtraEditForumTopic): Promise<true>;
        editGeneralForumTopic(name: string): Promise<true>;
        editMessageCaption(
            caption: string | FmtString<string> | undefined,
            extra?: Omit<
                {},
                "caption"
                | "chat_id"
                | "message_id"
                | "inline_message_id",
            >,
        ): Promise<true | Edited & CaptionableMessage & BusinessSentMessage>;
        editMessageChecklist(
            businessConnectionId: string,
            messageId: number,
            checklist: InputChecklist,
            extra?: Omit<
                {},
                "chat_id"
                | "business_connection_id"
                | "message_id"
                | "checklist",
            >,
        ): Promise<ChecklistMessage & BusinessSentMessage>;
        editMessageLiveLocation(
            latitude: number,
            longitude: number,
            extra?: Omit<
                {},
                "chat_id"
                | "message_id"
                | "inline_message_id"
                | "latitude"
                | "longitude",
            >,
        ): Promise<true | Edited & LocationMessage & BusinessSentMessage>;
        editMessageMedia(
            media:
                | { caption?: string
                | FmtString<string> }
                | { caption?: string | FmtString<string> }
                | { caption?: string | FmtString<string> }
                | { caption?: string | FmtString<string> }
                | { caption?: string | FmtString<string> },
            extra?: Omit<{}, "chat_id" | "message_id" | "inline_message_id" | "media">,
        ): Promise<true | (Edited & (Message & BusinessSentMessage))>;
        editMessageReplyMarkup(
            markup: InlineKeyboardMarkup | undefined,
        ): Promise<true | (Edited & (Message & BusinessSentMessage))>;
        editMessageText(
            text: string | FmtString<string>,
            extra?: Omit<{}, "text" | "chat_id" | "message_id" | "inline_message_id">,
        ): Promise<true | Edited & TextMessage & BusinessSentMessage>;
        editUserStarSubscription(
            ...args: [paymentChargeId: string, isCanceled: boolean],
        ): Promise<true>;
        entities<
            EntityTypes extends
                (
                    | "url"
                    | "mention"
                    | "hashtag"
                    | "cashtag"
                    | "bot_command"
                    | "email"
                    | "phone_number"
                    | "bold"
                    | "blockquote"
                    | "expandable_blockquote"
                    | "italic"
                    | "underline"
                    | "strikethrough"
                    | "spoiler"
                    | "code"
                    | "pre"
                    | "text_link"
                    | "text_mention"
                    | "custom_emoji"
                )[],
        >(
            ...types: EntityTypes,
        ): (MessageEntity & { fragment: string; type: SelectedTypes })[];
        exportChatInviteLink(...args: []): Promise<string>;
        forwardMessage(
            chatId: string | number,
            extra?: Omit<{}, "chat_id" | "from_chat_id" | "message_id">,
        ): Promise<Message & BusinessSentMessage>;
        forwardMessages(
            chatId: string | number,
            messageIds: number[],
            extra?: Omit<{}, "chat_id" | "from_chat_id" | "message_ids">,
        ): Promise<MessageId[]>;
        getAvailableGifts(): Promise<Gifts>;
        getChat(...args: []): Promise<ChatFullInfo>;
        getChatAdministrators(
            ...args: [],
        ): Promise<(ChatMemberOwner | ChatMemberAdministrator)[]>;
        getChatMember(...args: [userId: number]): Promise<ChatMember>;
        getChatMembersCount(...args: []): Promise<number>;
        getChatMenuButton(): Promise<MenuButton>;
        getMyCommands(): Promise<BotCommand[]>;
        getMyDefaultAdministratorRights(
            extra?: { forChannels?: boolean },
        ): Promise<ChatAdministratorRights>;
        getMyStarBalance(): Promise<StarAmount>;
        getStarTransactions(
            offset?: number,
            limit?: number,
        ): Promise<StarTransactions>;
        getStickerSet(setName: string): Promise<StickerSet>;
        getUserChatBoosts(): Promise<UserChatBoosts>;
        getUserProfileAudios(
            extra?: Omit<{}, "chat_id" | "user_id">,
        ): Promise<UserProfileAudios>;
        getUserProfilePhotos(
            offset?: number,
            limit?: number,
        ): Promise<UserProfilePhotos>;
        giftPremiumSubscription(
            starCount: 1000 | 1500 | 2500,
            monthCount: 3 | 6 | 12,
            extra?: Omit<{}, "chat_id" | "user_id" | "star_count" | "month_count">,
        ): Promise<true>;
        has<Filter extends UpdateType | Guard<Update>>(
            filters: MaybeArray<Filter>,
        ): this is FilteredContext<Context<Update>, Filter>;
        hideGeneralForumTopic(): Promise<true>;
        leaveChat(...args: []): Promise<true>;
        persistentChatAction(
            action:
                | "typing"
                | "upload_photo"
                | "record_video"
                | "upload_video"
                | "record_voice"
                | "upload_voice"
                | "upload_document"
                | "choose_sticker"
                | "find_location"
                | "record_video_note"
                | "upload_video_note",
            callback: () => Promise<void>,
            extra?: Omit<{}, "action" | "chat_id"> & { intervalDuration?: number },
        ): Promise<void>;
        pinChatMessage(
            ...args: [
                messageId: number,
                extra?: { disable_notification?: boolean },
            ],
        ): Promise<true>;
        promoteChatMember(
            ...args: [userId: number, extra: Omit<{}, "chat_id" | "user_id">],
        ): Promise<true>;
        react(
            reaction?: MaybeArray<
                (
                    ReactionType | TelegramEmoji | `0${string}` | `1${string}` | `2${string}` | `3${string}` | `4${string}` | `5${string}` | `6${string}` | `7${string}` | `8${string}` | `9${string}`
                ),
            >,
            is_big?: boolean,
        ): Promise<true>;
        refundStarPayment(...args: [paymentChargeId: string]): Promise<true>;
        removeChatVerification(): Promise<true>;
        removeUserVerification(): Promise<true>;
        reopenForumTopic(): Promise<true>;
        reopenGeneralForumTopic(): Promise<true>;
        reply(
            ...args: [
                text: string
                | FmtString<string>,
                extra?: Omit<{}, "text" | "chat_id">,
            ],
        ): Promise<TextMessage & BusinessSentMessage>;
        replyWithAnimation(
            ...args: [
                animation: string
                | InputFile,
                extra?: { caption?: string | FmtString<string> },
            ],
        ): Promise<AnimationMessage & BusinessSentMessage>;
        replyWithAudio(
            ...args: [
                audio: string
                | InputFile,
                extra?: { caption?: string | FmtString<string> },
            ],
        ): Promise<AudioMessage & BusinessSentMessage>;
        replyWithChatAction(
            ...args: [
                action: | "typing"
                | "upload_photo"
                | "record_video"
                | "upload_video"
                | "record_voice"
                | "upload_voice"
                | "upload_document"
                | "choose_sticker"
                | "find_location"
                | "record_video_note"
                | "upload_video_note",
                extra?: Omit<{}, "action" | "chat_id">,
            ],
        ): Promise<true>;
        replyWithContact(
            ...args: [
                phoneNumber: string,
                firstName: string,
                extra?: Omit<{}, "phone_number" | "chat_id" | "first_name">,
            ],
        ): Promise<ContactMessage & BusinessSentMessage>;
        replyWithDice(
            ...args: [extra?: Omit<{}, "chat_id">],
        ): Promise<DiceMessage & BusinessSentMessage>;
        replyWithDocument(
            ...args: [
                document: string
                | InputFile,
                extra?: { caption?: string | FmtString<string> },
            ],
        ): Promise<DocumentMessage & BusinessSentMessage>;
        replyWithGame(
            ...args: [
                gameName: string,
                extra?: Omit<{}, "chat_id" | "game_short_name">,
            ],
        ): Promise<GameMessage & BusinessSentMessage>;
        replyWithHTML(
            html: string,
            extra?: Omit<{}, "text" | "chat_id">,
        ): Promise<TextMessage & BusinessSentMessage>;
        replyWithInvoice(
            ...args: [
                invoice: Omit<
                    {},
                    | "chat_id"
                    | "message_thread_id"
                    | "disable_notification"
                    | "reply_parameters"
                    | "reply_markup",
                >,
                extra?: Omit<
                    {},
                    | "chat_id"
                    | "direct_messages_topic_id"
                    | "protect_content"
                    | "allow_paid_broadcast"
                    | "message_effect_id"
                    | "suggested_post_parameters"
                    | "title"
                    | "description"
                    | "payload"
                    | "provider_token"
                    | "currency"
                    | "prices"
                    | "max_tip_amount"
                    | "suggested_tip_amounts"
                    | "provider_data"
                    | "photo_url"
                    | "photo_size"
                    | "photo_width"
                    | "photo_height"
                    | "need_name"
                    | "need_phone_number"
                    | "need_email"
                    | "need_shipping_address"
                    | "send_phone_number_to_provider"
                    | "send_email_to_provider"
                    | "is_flexible"
                    | "start_parameter",
                >,
            ],
        ): Promise<InvoiceMessage & BusinessSentMessage>;
        replyWithLocation(
            ...args: [
                latitude: number,
                longitude: number,
                extra?: Omit<{}, "chat_id" | "latitude" | "longitude">,
            ],
        ): Promise<LocationMessage & BusinessSentMessage>;
        replyWithMarkdown(
            markdown: string,
            extra?: Omit<{}, "text" | "chat_id">,
        ): Promise<TextMessage & BusinessSentMessage>;
        replyWithMarkdownV2(
            markdown: string,
            extra?: Omit<{}, "text" | "chat_id">,
        ): Promise<TextMessage & BusinessSentMessage>;
        replyWithMediaGroup(
            ...args: [media: MediaGroup, extra?: Omit<{}, "chat_id" | "media">],
        ): Promise<
            (
                (DocumentMessage | AudioMessage | PhotoMessage | VideoMessage) & BusinessSentMessage
            )[],
        >;
        replyWithPhoto(
            ...args: [
                photo: string
                | InputFile,
                extra?: { caption?: string | FmtString<string> },
            ],
        ): Promise<PhotoMessage & BusinessSentMessage>;
        replyWithPoll(
            ...args: [
                question: string,
                options: readonly InputPollOption[],
                extra?: Omit<{}, "type" | "chat_id" | "question" | "options">,
            ],
        ): Promise<PollMessage & BusinessSentMessage>;
        replyWithQuiz(
            ...args: [
                question: string,
                options: readonly InputPollOption[],
                extra?: Omit<{}, "type" | "chat_id" | "question" | "options">,
            ],
        ): Promise<PollMessage & BusinessSentMessage>;
        replyWithSticker(
            ...args: [
                sticker: string
                | InputFile,
                extra?: Omit<{}, "chat_id" | "sticker">,
            ],
        ): Promise<StickerMessage & BusinessSentMessage>;
        replyWithVenue(
            ...args: [
                latitude: number,
                longitude: number,
                title: string,
                address: string,
                extra?: Omit<
                    {},
                    "chat_id"
                    | "title"
                    | "latitude"
                    | "longitude"
                    | "address",
                >,
            ],
        ): Promise<VenueMessage & BusinessSentMessage>;
        replyWithVideo(
            ...args: [
                video: string
                | InputFile,
                extra?: { caption?: string | FmtString<string> },
            ],
        ): Promise<VideoMessage & BusinessSentMessage>;
        replyWithVideoNote(
            ...args: [
                videoNote: string
                | InputFileVideoNote,
                extra?: Omit<{}, "chat_id" | "video_note">,
            ],
        ): Promise<VideoNoteMessage & BusinessSentMessage>;
        replyWithVoice(
            ...args: [
                voice: string
                | InputFile,
                extra?: { caption?: string | FmtString<string> },
            ],
        ): Promise<VoiceMessage & BusinessSentMessage>;
        restrictChatMember(
            ...args: [userId: number, extra: Omit<{}, "chat_id" | "user_id">],
        ): Promise<true>;
        revokeChatInviteLink(
            ...args: [inviteLink: string],
        ): Promise<ChatInviteLink>;
        sendAnimation(
            animation: string | InputFile,
            extra?: { caption?: string | FmtString<string> },
        ): Promise<AnimationMessage & BusinessSentMessage>;
        sendAudio(
            audio: string | InputFile,
            extra?: { caption?: string | FmtString<string> },
        ): Promise<AudioMessage & BusinessSentMessage>;
        sendChatAction(
            action:
                | "typing"
                | "upload_photo"
                | "record_video"
                | "upload_video"
                | "record_voice"
                | "upload_voice"
                | "upload_document"
                | "choose_sticker"
                | "find_location"
                | "record_video_note"
                | "upload_video_note",
            extra?: Omit<{}, "action" | "chat_id">,
        ): Promise<true>;
        sendChecklist(
            businessConnectionId: string,
            checklist: InputChecklist,
            extra?: Omit<{}, "chat_id" | "checklist">,
        ): Promise<ChecklistMessage & BusinessSentMessage>;
        sendContact(
            phoneNumber: string,
            firstName: string,
            extra?: Omit<{}, "phone_number" | "chat_id" | "first_name">,
        ): Promise<ContactMessage & BusinessSentMessage>;
        sendDice(
            extra?: Omit<{}, "chat_id">,
        ): Promise<DiceMessage & BusinessSentMessage>;
        sendDocument(
            document: string | InputFile,
            extra?: { caption?: string | FmtString<string> },
        ): Promise<DocumentMessage & BusinessSentMessage>;
        sendGame(
            game: string,
            extra?: Omit<{}, "chat_id" | "game_short_name">,
        ): Promise<GameMessage & BusinessSentMessage>;
        sendGift(
            giftId: string,
            extra?: Omit<{}, "chat_id" | "gift_id">,
        ): Promise<true>;
        sendInvoice(
            invoice: NewInvoiceParameters,
            extra?: Omit<
                {},
                | "chat_id"
                | "direct_messages_topic_id"
                | "protect_content"
                | "allow_paid_broadcast"
                | "message_effect_id"
                | "suggested_post_parameters"
                | "title"
                | "description"
                | "payload"
                | "provider_token"
                | "currency"
                | "prices"
                | "max_tip_amount"
                | "suggested_tip_amounts"
                | "provider_data"
                | "photo_url"
                | "photo_size"
                | "photo_width"
                | "photo_height"
                | "need_name"
                | "need_phone_number"
                | "need_email"
                | "need_shipping_address"
                | "send_phone_number_to_provider"
                | "send_email_to_provider"
                | "is_flexible"
                | "start_parameter",
            >,
        ): Promise<InvoiceMessage & BusinessSentMessage>;
        sendLocation(
            latitude: number,
            longitude: number,
            extra?: Omit<{}, "chat_id" | "latitude" | "longitude">,
        ): Promise<LocationMessage & BusinessSentMessage>;
        sendMediaGroup(
            media: MediaGroup,
            extra?: Omit<{}, "chat_id" | "media">,
        ): Promise<
            (
                (DocumentMessage | AudioMessage | PhotoMessage | VideoMessage) & BusinessSentMessage
            )[],
        >;
        sendMessage(
            text: string | FmtString<string>,
            extra?: Omit<{}, "text" | "chat_id">,
        ): Promise<TextMessage & BusinessSentMessage>;
        sendMessageDraft(
            draftId: number,
            text: string,
            extra?: Omit<{}, "text" | "chat_id" | "draft_id">,
        ): Promise<true>;
        sendPaidMedia(
            starCount: number,
            media: PaidMediaGroup,
            extra?: Omit<{}, "caption" | "chat_id" | "media" | "star_count">,
        ): Promise<PaidMediaMessage & BusinessSentMessage>;
        sendPhoto(
            photo: string | InputFile,
            extra?: { caption?: string | FmtString<string> },
        ): Promise<PhotoMessage & BusinessSentMessage>;
        sendPoll(
            poll: string,
            options: readonly InputPollOption[],
            extra?: Omit<{}, "type" | "chat_id" | "question" | "options">,
        ): Promise<PollMessage & BusinessSentMessage>;
        sendQuiz(
            quiz: string,
            options: readonly InputPollOption[],
            extra?: Omit<{}, "type" | "chat_id" | "question" | "options">,
        ): Promise<PollMessage & BusinessSentMessage>;
        sendSticker(
            sticker: string | InputFile,
            extra?: Omit<{}, "chat_id" | "sticker">,
        ): Promise<StickerMessage & BusinessSentMessage>;
        sendVenue(
            latitude: number,
            longitude: number,
            title: string,
            address: string,
            extra?: Omit<
                {},
                "chat_id"
                | "title"
                | "latitude"
                | "longitude"
                | "address",
            >,
        ): Promise<VenueMessage & BusinessSentMessage>;
        sendVideo(
            video: string | InputFile,
            extra?: { caption?: string | FmtString<string> },
        ): Promise<VideoMessage & BusinessSentMessage>;
        sendVideoNote(
            videoNote: string | InputFileVideoNote,
            extra?: Omit<{}, "chat_id" | "video_note">,
        ): Promise<VideoNoteMessage & BusinessSentMessage>;
        sendVoice(
            voice: string | InputFile,
            extra?: { caption?: string | FmtString<string> },
        ): Promise<VoiceMessage & BusinessSentMessage>;
        setChatAdministratorCustomTitle(
            ...args: [userId: number, title: string],
        ): Promise<true>;
        setChatDescription(...args: [description?: string]): Promise<true>;
        setChatMenuButton(menuButton?: MenuButton): Promise<true>;
        setChatPermissions(
            ...args: [
                permissions: ChatPermissions,
                extra?: Omit<{}, "chat_id" | "permissions">,
            ],
        ): Promise<true>;
        setChatPhoto(...args: [photo: InputFile]): Promise<true>;
        setChatStickerSet(setName: string): Promise<true>;
        setChatTitle(...args: [title: string]): Promise<true>;
        setCustomEmojiStickerSetThumbnail(
            ...args: [name: string, custom_emoji_id: string],
        ): Promise<true>;
        setMyCommands(commands: readonly BotCommand[]): Promise<true>;
        setMyDefaultAdministratorRights(
            extra?: { forChannels?: boolean; rights?: ChatAdministratorRights },
        ): Promise<true>;
        setPassportDataErrors(
            errors: readonly PassportElementError[],
        ): Promise<true>;
        setStickerEmojiList(
            ...args: [sticker: string, emoji_list: string[]],
        ): Promise<true>;
        setStickerKeywords(
            ...args: [sticker: string, keywords?: string[]],
        ): Promise<true>;
        setStickerMaskPosition(
            ...args: [sticker: string, mask_position?: MaskPosition],
        ): Promise<true>;
        setStickerPositionInSet(sticker: string, position: number): Promise<true>;
        setStickerSetThumb(
            ...args: [
                name: string,
                userId: number,
                thumbnail?: string
                | InputFile,
                format: "video" | "static" | "animated",
            ],
        ): Promise<true>;
        setStickerSetThumbnail(
            ...args: [
                name: string,
                userId: number,
                thumbnail?: string
                | InputFile,
                format: "video" | "static" | "animated",
            ],
        ): Promise<true>;
        setStickerSetTitle(...args: [name: string, title: string]): Promise<true>;
        setUserEmojiStatus(extra?: Omit<{}, "chat_id" | "user_id">): Promise<true>;
        stopMessageLiveLocation(
            markup?: InlineKeyboardMarkup,
        ): Promise<true | Edited & LocationMessage & BusinessSentMessage>;
        stopPoll(
            ...args: [
                messageId: number,
                extra?: Omit<{}, "chat_id" | "message_id">,
            ],
        ): Promise<Poll>;
        unbanChatMember(
            ...args: [userId: number, extra?: { only_if_banned?: boolean }],
        ): Promise<true>;
        unbanChatSenderChat(senderChatId: number): Promise<true>;
        unhideGeneralForumTopic(): Promise<true>;
        unpinAllChatMessages(...args: []): Promise<true>;
        unpinAllForumTopicMessages(): Promise<true>;
        unpinAllGeneralForumTopicMessages(): Promise<true>;
        unpinChatMessage(...args: [messageId?: number]): Promise<true>;
        uploadStickerFile(
            ...args: [
                sticker: InputFile,
                sticker_format: "video"
                | "static"
                | "animated",
            ],
        ): Promise<File>;
        verifyChat(...args: [extra?: Omit<{}, "chat_id">]): Promise<true>;
        verifyUser(
            ...args: [extra?: Omit<{}, "chat_id" | "user_id">],
        ): Promise<true>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    Accessors

    Methods

    addStickerToSet answerCbQuery answerGameQuery answerInlineQuery answerPreCheckoutQuery answerShippingQuery approveChatJoinRequest approveSuggestedPost banChatMember banChatSenderChat closeForumTopic closeGeneralForumTopic copyMessage copyMessages createChatInviteLink createChatSubscriptionInviteLink createForumTopic createNewStickerSet declineChatJoinRequest declineSuggestedPost deleteChatPhoto deleteChatStickerSet deleteForumTopic deleteMessage deleteMessages deleteStickerFromSet deleteStickerSet editChatInviteLink editChatSubscriptionInviteLink editForumTopic editGeneralForumTopic editMessageCaption editMessageChecklist editMessageLiveLocation editMessageMedia editMessageReplyMarkup editMessageText editUserStarSubscription entities exportChatInviteLink forwardMessage forwardMessages getAvailableGifts getChat getChatAdministrators getChatMember getChatMembersCount getChatMenuButton getMyCommands getMyDefaultAdministratorRights getMyStarBalance getStarTransactions getStickerSet getUserChatBoosts getUserProfileAudios getUserProfilePhotos giftPremiumSubscription has hideGeneralForumTopic leaveChat persistentChatAction pinChatMessage promoteChatMember react refundStarPayment removeChatVerification removeUserVerification reopenForumTopic reopenGeneralForumTopic reply replyWithAnimation replyWithAudio replyWithChatAction replyWithContact replyWithDice replyWithDocument replyWithGame replyWithHTML replyWithInvoice replyWithLocation replyWithMarkdown replyWithMarkdownV2 replyWithMediaGroup replyWithPhoto replyWithPoll replyWithQuiz replyWithSticker replyWithVenue replyWithVideo replyWithVideoNote replyWithVoice restrictChatMember revokeChatInviteLink sendAnimation sendAudio sendChatAction sendChecklist sendContact sendDice sendDocument sendGame sendGift sendInvoice sendLocation sendMediaGroup sendMessage sendMessageDraft sendPaidMedia sendPhoto sendPoll sendQuiz sendSticker sendVenue sendVideo sendVideoNote sendVoice setChatAdministratorCustomTitle setChatDescription setChatMenuButton setChatPermissions setChatPhoto setChatStickerSet setChatTitle setCustomEmojiStickerSetThumbnail setMyCommands setMyDefaultAdministratorRights setPassportDataErrors setStickerEmojiList setStickerKeywords setStickerMaskPosition setStickerPositionInSet setStickerSetThumb setStickerSetThumbnail setStickerSetTitle setUserEmojiStatus stopMessageLiveLocation stopPoll unbanChatMember unbanChatSenderChat unhideGeneralForumTopic unpinAllChatMessages unpinAllForumTopicMessages unpinAllGeneralForumTopicMessages unpinChatMessage uploadStickerFile verifyChat verifyUser

    Properties

    botInfo: UserFromGetMe
    session: SceneSession<D>
    state: Record<string | symbol, any> = {}
    telegram: Telegram
    update: Update

    Accessors

    • get businessMessage(): PropOr<U, "business_message">

      Returns PropOr<U, "business_message">

    • get "businessСonnection"(): PropOr<U, "business_connection">

      Returns PropOr<U, "business_connection">

    • get callbackQuery(): PropOr<U, "callback_query">

      Returns PropOr<U, "callback_query">

    • get channelPost(): PropOr<U, "channel_post">

      Returns PropOr<U, "channel_post">

    • get chat(): PropOr<GetUpdateContent<U>, "chat">

      Returns PropOr<GetUpdateContent<U>, "chat">

    • get chatBoost(): PropOr<U, "chat_boost">

      Returns PropOr<U, "chat_boost">

    • get chatJoinRequest(): PropOr<U, "chat_join_request">

      Returns PropOr<U, "chat_join_request">

    • get chatMember(): PropOr<U, "chat_member">

      Returns PropOr<U, "chat_member">

    • get chosenInlineResult(): PropOr<U, "chosen_inline_result">

      Returns PropOr<U, "chosen_inline_result">

    • get deletedBusinessMessages(): PropOr<U, "deleted_business_messages">

      Returns PropOr<U, "deleted_business_messages">

    • get editedBusinessMessage(): PropOr<U, "edited_business_message">

      Returns PropOr<U, "edited_business_message">

    • get editedChannelPost(): PropOr<U, "edited_channel_post">

      Returns PropOr<U, "edited_channel_post">

    • get editedMessage(): PropOr<U, "edited_message">

      Returns PropOr<U, "edited_message">

    • get from(): GetUserFromAnySource<U>

      Returns GetUserFromAnySource<U>

    • get inlineQuery(): PropOr<U, "inline_query">

      Returns PropOr<U, "inline_query">

    • get kickChatMember(): (
          ...args: [
              userId: number,
              untilDate?: number,
              extra?: Omit<{}, "chat_id" | "user_id" | "until_date">,
          ],
      ) => Promise<true>

      Returns (
          ...args: [
              userId: number,
              untilDate?: number,
              extra?: Omit<{}, "chat_id" | "user_id" | "until_date">,
          ],
      ) => Promise<true>

        • (
              ...args: [
                  userId: number,
                  untilDate?: number,
                  extra?: Omit<{}, "chat_id" | "user_id" | "until_date">,
              ],
          ): Promise<true>
        • Parameters

          • ...args: [
                userId: number,
                untilDate?: number,
                extra?: Omit<{}, "chat_id" | "user_id" | "until_date">,
            ]

          Returns Promise<true>

    • get message(): PropOr<U, "message">

      Returns PropOr<U, "message">

    • get messageReaction(): PropOr<U, "message_reaction">

      Returns PropOr<U, "message_reaction">

    • get messageReactionCount(): PropOr<U, "message_reaction_count">

      Returns PropOr<U, "message_reaction_count">

    • get msg(): GetMsg<U> & Msg

      Shorthand for any message object present in the current update. One of message, edited_message, business_message, edited_business_message deleted_business_messages, channel_post, edited_channel_post or * callback_query.message

      Returns GetMsg<U> & Msg

    • get msgId(): GetMsgId<U>

      Shorthand for any message_id present in the current update.

      Returns GetMsgId<U>

    • get myChatMember(): PropOr<U, "my_chat_member">

      Returns PropOr<U, "my_chat_member">

    • get poll(): PropOr<U, "poll">

      Returns PropOr<U, "poll">

    • get pollAnswer(): PropOr<U, "poll_answer">

      Returns PropOr<U, "poll_answer">

    • get preCheckoutQuery(): PropOr<U, "pre_checkout_query">

      Returns PropOr<U, "pre_checkout_query">

    • get purchasedPaidMedia(): PropOr<U, "purchased_paid_media">

      Returns PropOr<U, "purchased_paid_media">

    • get removedChatBoost(): PropOr<U, "removed_chat_boost">

      Returns PropOr<U, "removed_chat_boost">

    • get senderChat(): PropOr<GetUpdateContent<U>, "sender_chat", undefined>

      Returns PropOr<GetUpdateContent<U>, "sender_chat", undefined>

    • get shippingQuery(): PropOr<U, "shipping_query">

      Returns PropOr<U, "shipping_query">

    • get text(): GetText<U>

      Returns GetText<U>

    • get webAppData(): | {
          button_text: string;
          data: { json<T>(): T; text(): string };
      }
      | undefined

      Returns { button_text: string; data: { json<T>(): T; text(): string } } | undefined

    Methods

    • Parameters

      • ...args: [
            results: readonly InlineQueryResult[],
            extra?: Omit<{}, "chat_id" | "inline_query_id" | "results">,
        ]

      Returns Promise<true>

    • Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.

      Parameters

      • messageId: number

        Identifier of a suggested post message to approve

      • Optionalextra: Omit<{}, "chat_id">
        • sendDate

          Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future

      Returns Promise<true>

    • Parameters

      • ...args: [
            userId: number,
            untilDate?: number,
            extra?: Omit<{}, "chat_id" | "user_id" | "until_date">,
        ]

      Returns Promise<true>

    • Context-aware shorthand for Telegram.copyMessages

      Parameters

      • chatId: string | number

        Unique identifier for the target chat or username of the target channel (in the format @channelusername)

      • messageIds: number[]

        Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.

      • Optionalextra: Omit<{}, "chat_id" | "from_chat_id" | "message_ids">

      Returns Promise<MessageId[]>

    • Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.

      Parameters

      • ...args: [name: string, extra?: Omit<{}, "chat_id" | "name">]

      Returns Promise<ForumTopic>

    • Parameters

      • ...args: [
            name: string,
            title: string,
            stickerData: Omit<{}, "chat_id" | "name" | "user_id" | "title">,
        ]

      Returns Promise<true>

    • Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.

      Parameters

      • messageId: number

        Identifier of a suggested post message to approve

      • Optionalextra: Omit<{}, "chat_id">
        • comment

          Comment for the creator of the suggested post; 0-128 characters

      Returns Promise<true>

    • Context-aware shorthand for Telegram.deleteMessages

      Parameters

      • messageIds: number[]

        Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted

      Returns Promise<true>

    • Parameters

      • caption: string | FmtString<string> | undefined
      • Optionalextra: Omit<{}, "caption" | "chat_id" | "message_id" | "inline_message_id">

      Returns Promise<true | Edited & CaptionableMessage & BusinessSentMessage>

    • Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.

      Parameters

      • businessConnectionId: string

        Unique identifier of the business connection on behalf of which the message will be sent

      • messageId: number

        Unique identifier for the target message

      • checklist: InputChecklist

        A JSON-serialized object for the checklist to send

      • Optionalextra: Omit<{}, "chat_id" | "business_connection_id" | "message_id" | "checklist">
        • reply_markup

          A JSON-serialized object for the new inline keyboard for the message

      Returns Promise<ChecklistMessage & BusinessSentMessage>

    • Parameters

      • latitude: number
      • longitude: number
      • Optionalextra: Omit<
            {},
            "chat_id"
            | "message_id"
            | "inline_message_id"
            | "latitude"
            | "longitude",
        >

      Returns Promise<true | Edited & LocationMessage & BusinessSentMessage>

    • Parameters

      • media:
            | { caption?: string
            | FmtString<string> }
            | { caption?: string | FmtString<string> }
            | { caption?: string | FmtString<string> }
            | { caption?: string | FmtString<string> }
            | { caption?: string | FmtString<string> }
      • Optionalextra: Omit<{}, "chat_id" | "message_id" | "inline_message_id" | "media">

      Returns Promise<true | (Edited & (Message & BusinessSentMessage))>

    • Type Parameters

      • EntityTypes extends (
            | "url"
            | "mention"
            | "hashtag"
            | "cashtag"
            | "bot_command"
            | "email"
            | "phone_number"
            | "bold"
            | "blockquote"
            | "expandable_blockquote"
            | "italic"
            | "underline"
            | "strikethrough"
            | "spoiler"
            | "code"
            | "pre"
            | "text_link"
            | "text_mention"
            | "custom_emoji"
        )[]

      Parameters

      Returns (MessageEntity & { fragment: string; type: SelectedTypes })[]

    • Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.

      Parameters

      • Optionalextra: Omit<{}, "chat_id" | "user_id">
        • offset

          Sequential number of the first audio to be returned. By default, all audios are returned.

        • limit

          Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.

      Returns Promise<UserProfileAudios>

    • Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

      Parameters

      • Optionaloffset: number

        Sequential number of the first photo to be returned. By default, all photos are returned.

      • Optionallimit: number

        Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.

      Returns Promise<UserProfilePhotos>

    • Gifts a Telegram Premium subscription to the given user. Returns True on success.

      Parameters

      • starCount: 1000 | 1500 | 2500

        Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12

      • monthCount: 3 | 6 | 12

        Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months

      • Optionalextra: Omit<{}, "chat_id" | "user_id" | "star_count" | "month_count">
        • text

          Text that will be shown along with the service message about the subscription; 0-128 characters

        • text_parse_mode

          Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.

        • text_entities

          A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.

      Returns Promise<true>

    • Parameters

      • action:
            | "typing"
            | "upload_photo"
            | "record_video"
            | "upload_video"
            | "record_voice"
            | "upload_voice"
            | "upload_document"
            | "choose_sticker"
            | "find_location"
            | "record_video_note"
            | "upload_video_note"

        chat action type.

      • callback: () => Promise<void>

        a function to run along with the chat action.

      • extra: Omit<{}, "action" | "chat_id"> & { intervalDuration?: number } = {}

        extra parameters for sendChatAction.

        • intervalDuration

          The duration (in milliseconds) between subsequent sendChatAction requests.

        • OptionalintervalDuration?: number

          The duration (in milliseconds) between subsequent sendChatAction requests.

      Returns Promise<void>

      https://core.telegram.org/bots/api#sendchataction

      Sends the sendChatAction request repeatedly, with a delay between requests, as long as the provided callback function is being processed.

      The sendChatAction errors should be ignored, because the goal is the actual long process completing and performing an action.

    • Parameters

      • Optionalreaction: MaybeArray<
            (
                ReactionType | TelegramEmoji | `0${string}` | `1${string}` | `2${string}` | `3${string}` | `4${string}` | `5${string}` | `6${string}` | `7${string}` | `8${string}` | `9${string}`
            ),
        >

        An emoji or custom_emoji_id to set as reaction to current message. Leave empty to remove reactions.

      • Optionalis_big: boolean

        Pass True to set the reaction with a big animation

      Returns Promise<true>

    • Parameters

      • ...args: [
            action: | "typing"
            | "upload_photo"
            | "record_video"
            | "upload_video"
            | "record_voice"
            | "upload_voice"
            | "upload_document"
            | "choose_sticker"
            | "find_location"
            | "record_video_note"
            | "upload_video_note",
            extra?: Omit<{}, "action" | "chat_id">,
        ]

      Returns Promise<true>

    • Parameters

      • ...args: [
            phoneNumber: string,
            firstName: string,
            extra?: Omit<{}, "phone_number" | "chat_id" | "first_name">,
        ]

      Returns Promise<ContactMessage & BusinessSentMessage>

    • Parameters

      • ...args: [gameName: string, extra?: Omit<{}, "chat_id" | "game_short_name">]

      Returns Promise<GameMessage & BusinessSentMessage>

    • Parameters

      • ...args: [
            invoice: Omit<
                {},
                | "chat_id"
                | "message_thread_id"
                | "disable_notification"
                | "reply_parameters"
                | "reply_markup",
            >,
            extra?: Omit<
                {},
                | "chat_id"
                | "direct_messages_topic_id"
                | "protect_content"
                | "allow_paid_broadcast"
                | "message_effect_id"
                | "suggested_post_parameters"
                | "title"
                | "description"
                | "payload"
                | "provider_token"
                | "currency"
                | "prices"
                | "max_tip_amount"
                | "suggested_tip_amounts"
                | "provider_data"
                | "photo_url"
                | "photo_size"
                | "photo_width"
                | "photo_height"
                | "need_name"
                | "need_phone_number"
                | "need_email"
                | "need_shipping_address"
                | "send_phone_number_to_provider"
                | "send_email_to_provider"
                | "is_flexible"
                | "start_parameter",
            >,
        ]

      Returns Promise<InvoiceMessage & BusinessSentMessage>

    • Parameters

      • ...args: [
            latitude: number,
            longitude: number,
            extra?: Omit<{}, "chat_id" | "latitude" | "longitude">,
        ]

      Returns Promise<LocationMessage & BusinessSentMessage>

    • Parameters

      • ...args: [media: MediaGroup, extra?: Omit<{}, "chat_id" | "media">]

      Returns Promise<
          (
              (DocumentMessage | AudioMessage | PhotoMessage | VideoMessage) & BusinessSentMessage
          )[],
      >

    • Parameters

      • ...args: [
            question: string,
            options: readonly InputPollOption[],
            extra?: Omit<{}, "type" | "chat_id" | "question" | "options">,
        ]

      Returns Promise<PollMessage & BusinessSentMessage>

    • Parameters

      • ...args: [
            question: string,
            options: readonly InputPollOption[],
            extra?: Omit<{}, "type" | "chat_id" | "question" | "options">,
        ]

      Returns Promise<PollMessage & BusinessSentMessage>

    • Parameters

      • ...args: [sticker: string | InputFile, extra?: Omit<{}, "chat_id" | "sticker">]

      Returns Promise<StickerMessage & BusinessSentMessage>

    • Parameters

      • ...args: [
            latitude: number,
            longitude: number,
            title: string,
            address: string,
            extra?: Omit<
                {},
                "chat_id"
                | "title"
                | "latitude"
                | "longitude"
                | "address",
            >,
        ]

      Returns Promise<VenueMessage & BusinessSentMessage>

    • Parameters

      • ...args: [
            videoNote: string
            | InputFileVideoNote,
            extra?: Omit<{}, "chat_id" | "video_note">,
        ]

      Returns Promise<VideoNoteMessage & BusinessSentMessage>

    • Parameters

      • action:
            | "typing"
            | "upload_photo"
            | "record_video"
            | "upload_video"
            | "record_voice"
            | "upload_voice"
            | "upload_document"
            | "choose_sticker"
            | "find_location"
            | "record_video_note"
            | "upload_video_note"
      • Optionalextra: Omit<{}, "action" | "chat_id">

      Returns Promise<true>

    • Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.

      Parameters

      • businessConnectionId: string

        Unique identifier of the business connection on behalf of which the message will be sent

      • checklist: InputChecklist

        A JSON-serialized object for the checklist to send

      • Optionalextra: Omit<{}, "chat_id" | "checklist">
        • disable_notification

          Sends the message silently. Users will receive a notification with no sound.

        • protect_content

          Protects the contents of the sent message from forwarding and saving

        • message_effect_id

          Unique identifier of the message effect to be added to the message

        • reply_parameters

          A JSON-serialized object for description of the message to reply to

        • reply_markup

          A JSON-serialized object for an inline keyboard

      Returns Promise<ChecklistMessage & BusinessSentMessage>

    • Parameters

      • phoneNumber: string
      • firstName: string
      • Optionalextra: Omit<{}, "phone_number" | "chat_id" | "first_name">

      Returns Promise<ContactMessage & BusinessSentMessage>

    • Parameters

      • game: string
      • Optionalextra: Omit<{}, "chat_id" | "game_short_name">

      Returns Promise<GameMessage & BusinessSentMessage>

    • Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.

      Parameters

      • giftId: string

        Identifier of the gift; limited gifts can't be sent to channel chats

      • Optionalextra: Omit<{}, "chat_id" | "gift_id">
        • user_id

          Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.

        • chat_id

          Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.

        • pay_for_upgrade

          Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver

        • text

          Text that will be shown along with the gift; 0-128 characters

        • text_parse_mode

          Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.

        • text_entities

          A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.

      Returns Promise<true>

    • Parameters

      • invoice: NewInvoiceParameters
      • Optionalextra: Omit<
            {},
            | "chat_id"
            | "direct_messages_topic_id"
            | "protect_content"
            | "allow_paid_broadcast"
            | "message_effect_id"
            | "suggested_post_parameters"
            | "title"
            | "description"
            | "payload"
            | "provider_token"
            | "currency"
            | "prices"
            | "max_tip_amount"
            | "suggested_tip_amounts"
            | "provider_data"
            | "photo_url"
            | "photo_size"
            | "photo_width"
            | "photo_height"
            | "need_name"
            | "need_phone_number"
            | "need_email"
            | "need_shipping_address"
            | "send_phone_number_to_provider"
            | "send_email_to_provider"
            | "is_flexible"
            | "start_parameter",
        >

      Returns Promise<InvoiceMessage & BusinessSentMessage>

    • Parameters

      • latitude: number
      • longitude: number
      • Optionalextra: Omit<{}, "chat_id" | "latitude" | "longitude">

      Returns Promise<LocationMessage & BusinessSentMessage>

    • Parameters

      • media: MediaGroup
      • Optionalextra: Omit<{}, "chat_id" | "media">

      Returns Promise<
          (
              (DocumentMessage | AudioMessage | PhotoMessage | VideoMessage) & BusinessSentMessage
          )[],
      >

    • Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.

      Parameters

      • draftId: number

        Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated

      • text: string

        Text of the message to be sent, 1-4096 characters after entities parsing

      • Optionalextra: Omit<{}, "text" | "chat_id" | "draft_id">
        • message_thread_id

          Unique identifier for the target message thread

        • parse_mode

          Mode for parsing entities in the message text. See formatting options for more details.

        • entities

          A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode

      Returns Promise<true>

    • Parameters

      • poll: string
      • options: readonly InputPollOption[]
      • Optionalextra: Omit<{}, "type" | "chat_id" | "question" | "options">

      Returns Promise<PollMessage & BusinessSentMessage>

    • Parameters

      • quiz: string
      • options: readonly InputPollOption[]
      • Optionalextra: Omit<{}, "type" | "chat_id" | "question" | "options">

      Returns Promise<PollMessage & BusinessSentMessage>

    • Parameters

      • latitude: number
      • longitude: number
      • title: string
      • address: string
      • Optionalextra: Omit<{}, "chat_id" | "title" | "latitude" | "longitude" | "address">

      Returns Promise<VenueMessage & BusinessSentMessage>

    • Parameters

      • videoNote: string | InputFileVideoNote
      • Optionalextra: Omit<{}, "chat_id" | "video_note">

      Returns Promise<VideoNoteMessage & BusinessSentMessage>

    • Parameters

      • ...args: [sticker: string, emoji_list: string[]]

      Returns Promise<true>

    • Parameters

      • ...args: [sticker: string, keywords?: string[]]

      Returns Promise<true>

    • Parameters

      • ...args: [sticker: string, mask_position?: MaskPosition]

      Returns Promise<true>

    • Parameters

      • ...args: [
            name: string,
            userId: number,
            thumbnail?: string
            | InputFile,
            format: "video" | "static" | "animated",
        ]

      Returns Promise<true>

    • Parameters

      • ...args: [name: string, title: string]

      Returns Promise<true>