ultra-telegram-framework
    Preparing search index...

    Interface TelegramBotApi

    interface TelegramBotApi {
        addStickerToSet(params: AddStickerToSetParams): Promise<boolean>;
        answerCallbackQuery(params: AnswerCallbackQueryParams): Promise<boolean>;
        answerGuestQuery(params: AnswerGuestQueryParams): Promise<SentGuestMessage>;
        answerInlineQuery(params: AnswerInlineQueryParams): Promise<boolean>;
        answerPreCheckoutQuery(
            params: AnswerPreCheckoutQueryParams,
        ): Promise<boolean>;
        answerShippingQuery(params: AnswerShippingQueryParams): Promise<boolean>;
        answerWebAppQuery(
            params: AnswerWebAppQueryParams,
        ): Promise<SentWebAppMessage>;
        approveChatJoinRequest(
            params: ApproveChatJoinRequestParams,
        ): Promise<boolean>;
        approveSuggestedPost(params: ApproveSuggestedPostParams): Promise<boolean>;
        banChatMember(params: BanChatMemberParams): Promise<boolean>;
        banChatSenderChat(params: BanChatSenderChatParams): Promise<boolean>;
        close(): Promise<boolean>;
        closeForumTopic(params: CloseForumTopicParams): Promise<boolean>;
        closeGeneralForumTopic(
            params: CloseGeneralForumTopicParams,
        ): Promise<boolean>;
        convertGiftToStars(params: ConvertGiftToStarsParams): Promise<boolean>;
        copyMessage(params: CopyMessageParams): Promise<MessageId>;
        copyMessages(params: CopyMessagesParams): Promise<MessageId[]>;
        createChatInviteLink(
            params: CreateChatInviteLinkParams,
        ): Promise<ChatInviteLink>;
        createChatSubscriptionInviteLink(
            params: CreateChatSubscriptionInviteLinkParams,
        ): Promise<ChatInviteLink>;
        createForumTopic(params: CreateForumTopicParams): Promise<ForumTopic>;
        createInvoiceLink(params: CreateInvoiceLinkParams): Promise<string>;
        createNewStickerSet(params: CreateNewStickerSetParams): Promise<boolean>;
        declineChatJoinRequest(
            params: DeclineChatJoinRequestParams,
        ): Promise<boolean>;
        declineSuggestedPost(params: DeclineSuggestedPostParams): Promise<boolean>;
        deleteAllMessageReactions(
            params: DeleteAllMessageReactionsParams,
        ): Promise<boolean>;
        deleteBusinessMessages(
            params: DeleteBusinessMessagesParams,
        ): Promise<boolean>;
        deleteChatPhoto(params: DeleteChatPhotoParams): Promise<boolean>;
        deleteChatStickerSet(params: DeleteChatStickerSetParams): Promise<boolean>;
        deleteForumTopic(params: DeleteForumTopicParams): Promise<boolean>;
        deleteMessage(params: DeleteMessageParams): Promise<boolean>;
        deleteMessageReaction(
            params: DeleteMessageReactionParams,
        ): Promise<boolean>;
        deleteMessages(params: DeleteMessagesParams): Promise<boolean>;
        deleteMyCommands(params: DeleteMyCommandsParams): Promise<boolean>;
        deleteStickerFromSet(params: DeleteStickerFromSetParams): Promise<boolean>;
        deleteStickerSet(params: DeleteStickerSetParams): Promise<boolean>;
        deleteStory(params: DeleteStoryParams): Promise<boolean>;
        deleteWebhook(params: DeleteWebhookParams): Promise<boolean>;
        editChatInviteLink(
            params: EditChatInviteLinkParams,
        ): Promise<ChatInviteLink>;
        editChatSubscriptionInviteLink(
            params: EditChatSubscriptionInviteLinkParams,
        ): Promise<ChatInviteLink>;
        editForumTopic(params: EditForumTopicParams): Promise<boolean>;
        editGeneralForumTopic(
            params: EditGeneralForumTopicParams,
        ): Promise<boolean>;
        editMessageCaption(
            params: EditMessageCaptionParams,
        ): Promise<boolean | Message>;
        editMessageChecklist(params: EditMessageChecklistParams): Promise<Message>;
        editMessageLiveLocation(
            params: EditMessageLiveLocationParams,
        ): Promise<boolean | Message>;
        editMessageMedia(
            params: EditMessageMediaParams,
        ): Promise<boolean | Message>;
        editMessageReplyMarkup(
            params: EditMessageReplyMarkupParams,
        ): Promise<boolean | Message>;
        editMessageText(params: EditMessageTextParams): Promise<boolean | Message>;
        editStory(params: EditStoryParams): Promise<Story>;
        editUserStarSubscription(
            params: EditUserStarSubscriptionParams,
        ): Promise<boolean>;
        exportChatInviteLink(params: ExportChatInviteLinkParams): Promise<string>;
        forwardMessage(params: ForwardMessageParams): Promise<Message>;
        forwardMessages(params: ForwardMessagesParams): Promise<MessageId[]>;
        getAvailableGifts(): Promise<Gifts>;
        getBusinessAccountGifts(
            params: GetBusinessAccountGiftsParams,
        ): Promise<OwnedGifts>;
        getBusinessAccountStarBalance(
            params: GetBusinessAccountStarBalanceParams,
        ): Promise<StarAmount>;
        getBusinessConnection(
            params: GetBusinessConnectionParams,
        ): Promise<BusinessConnection>;
        getChat(params: GetChatParams): Promise<ChatFullInfo>;
        getChatAdministrators(
            params: GetChatAdministratorsParams,
        ): Promise<ChatMember[]>;
        getChatGifts(params: GetChatGiftsParams): Promise<OwnedGifts>;
        getChatMember(params: GetChatMemberParams): Promise<ChatMember>;
        getChatMemberCount(params: GetChatMemberCountParams): Promise<number>;
        getChatMenuButton(params: GetChatMenuButtonParams): Promise<MenuButton>;
        getCustomEmojiStickers(
            params: GetCustomEmojiStickersParams,
        ): Promise<Sticker[]>;
        getFile(params: GetFileParams): Promise<File>;
        getForumTopicIconStickers(): Promise<Sticker[]>;
        getGameHighScores(
            params: GetGameHighScoresParams,
        ): Promise<GameHighScore[]>;
        getManagedBotAccessSettings(
            params: GetManagedBotAccessSettingsParams,
        ): Promise<BotAccessSettings>;
        getManagedBotToken(params: GetManagedBotTokenParams): Promise<string>;
        getMe(): Promise<User>;
        getMyCommands(params: GetMyCommandsParams): Promise<BotCommand[]>;
        getMyDefaultAdministratorRights(
            params: GetMyDefaultAdministratorRightsParams,
        ): Promise<ChatAdministratorRights>;
        getMyDescription(params: GetMyDescriptionParams): Promise<BotDescription>;
        getMyName(params: GetMyNameParams): Promise<BotName>;
        getMyShortDescription(
            params: GetMyShortDescriptionParams,
        ): Promise<BotShortDescription>;
        getMyStarBalance(): Promise<StarAmount>;
        getStarTransactions(
            params: GetStarTransactionsParams,
        ): Promise<StarTransactions>;
        getStickerSet(params: GetStickerSetParams): Promise<StickerSet>;
        getUpdates(params: GetUpdatesParams): Promise<Update[]>;
        getUserChatBoosts(params: GetUserChatBoostsParams): Promise<UserChatBoosts>;
        getUserGifts(params: GetUserGiftsParams): Promise<OwnedGifts>;
        getUserPersonalChatMessages(
            params: GetUserPersonalChatMessagesParams,
        ): Promise<Message[]>;
        getUserProfileAudios(
            params: GetUserProfileAudiosParams,
        ): Promise<UserProfileAudios>;
        getUserProfilePhotos(
            params: GetUserProfilePhotosParams,
        ): Promise<UserProfilePhotos>;
        getWebhookInfo(): Promise<WebhookInfo>;
        giftPremiumSubscription(
            params: GiftPremiumSubscriptionParams,
        ): Promise<boolean>;
        hideGeneralForumTopic(
            params: HideGeneralForumTopicParams,
        ): Promise<boolean>;
        leaveChat(params: LeaveChatParams): Promise<boolean>;
        logOut(): Promise<boolean>;
        pinChatMessage(params: PinChatMessageParams): Promise<boolean>;
        postStory(params: PostStoryParams): Promise<Story>;
        promoteChatMember(params: PromoteChatMemberParams): Promise<boolean>;
        readBusinessMessage(params: ReadBusinessMessageParams): Promise<boolean>;
        refundStarPayment(params: RefundStarPaymentParams): Promise<boolean>;
        removeBusinessAccountProfilePhoto(
            params: RemoveBusinessAccountProfilePhotoParams,
        ): Promise<boolean>;
        removeChatVerification(
            params: RemoveChatVerificationParams,
        ): Promise<boolean>;
        removeMyProfilePhoto(): Promise<boolean>;
        removeUserVerification(
            params: RemoveUserVerificationParams,
        ): Promise<boolean>;
        reopenForumTopic(params: ReopenForumTopicParams): Promise<boolean>;
        reopenGeneralForumTopic(
            params: ReopenGeneralForumTopicParams,
        ): Promise<boolean>;
        replaceManagedBotToken(
            params: ReplaceManagedBotTokenParams,
        ): Promise<string>;
        replaceStickerInSet(params: ReplaceStickerInSetParams): Promise<boolean>;
        repostStory(params: RepostStoryParams): Promise<Story>;
        restrictChatMember(params: RestrictChatMemberParams): Promise<boolean>;
        revokeChatInviteLink(
            params: RevokeChatInviteLinkParams,
        ): Promise<ChatInviteLink>;
        savePreparedInlineMessage(
            params: SavePreparedInlineMessageParams,
        ): Promise<PreparedInlineMessage>;
        savePreparedKeyboardButton(
            params: SavePreparedKeyboardButtonParams,
        ): Promise<PreparedKeyboardButton>;
        sendAnimation(params: SendAnimationParams): Promise<Message>;
        sendAudio(params: SendAudioParams): Promise<Message>;
        sendChatAction(params: SendChatActionParams): Promise<boolean>;
        sendChecklist(params: SendChecklistParams): Promise<Message>;
        sendContact(params: SendContactParams): Promise<Message>;
        sendDice(params: SendDiceParams): Promise<Message>;
        sendDocument(params: SendDocumentParams): Promise<Message>;
        sendGame(params: SendGameParams): Promise<Message>;
        sendGift(params: SendGiftParams): Promise<boolean>;
        sendInvoice(params: SendInvoiceParams): Promise<Message>;
        sendLivePhoto(params: SendLivePhotoParams): Promise<Message>;
        sendLocation(params: SendLocationParams): Promise<Message>;
        sendMediaGroup(params: SendMediaGroupParams): Promise<Message[]>;
        sendMessage(params: SendMessageParams): Promise<Message>;
        sendMessageDraft(params: SendMessageDraftParams): Promise<boolean>;
        sendPaidMedia(params: SendPaidMediaParams): Promise<Message>;
        sendPhoto(params: SendPhotoParams): Promise<Message>;
        sendPoll(params: SendPollParams): Promise<Message>;
        sendSticker(params: SendStickerParams): Promise<Message>;
        sendVenue(params: SendVenueParams): Promise<Message>;
        sendVideo(params: SendVideoParams): Promise<Message>;
        sendVideoNote(params: SendVideoNoteParams): Promise<Message>;
        sendVoice(params: SendVoiceParams): Promise<Message>;
        setBusinessAccountBio(
            params: SetBusinessAccountBioParams,
        ): Promise<boolean>;
        setBusinessAccountGiftSettings(
            params: SetBusinessAccountGiftSettingsParams,
        ): Promise<boolean>;
        setBusinessAccountName(
            params: SetBusinessAccountNameParams,
        ): Promise<boolean>;
        setBusinessAccountProfilePhoto(
            params: SetBusinessAccountProfilePhotoParams,
        ): Promise<boolean>;
        setBusinessAccountUsername(
            params: SetBusinessAccountUsernameParams,
        ): Promise<boolean>;
        setChatAdministratorCustomTitle(
            params: SetChatAdministratorCustomTitleParams,
        ): Promise<boolean>;
        setChatDescription(params: SetChatDescriptionParams): Promise<boolean>;
        setChatMemberTag(params: SetChatMemberTagParams): Promise<boolean>;
        setChatMenuButton(params: SetChatMenuButtonParams): Promise<boolean>;
        setChatPermissions(params: SetChatPermissionsParams): Promise<boolean>;
        setChatPhoto(params: SetChatPhotoParams): Promise<boolean>;
        setChatStickerSet(params: SetChatStickerSetParams): Promise<boolean>;
        setChatTitle(params: SetChatTitleParams): Promise<boolean>;
        setCustomEmojiStickerSetThumbnail(
            params: SetCustomEmojiStickerSetThumbnailParams,
        ): Promise<boolean>;
        setGameScore(params: SetGameScoreParams): Promise<boolean | Message>;
        setManagedBotAccessSettings(
            params: SetManagedBotAccessSettingsParams,
        ): Promise<boolean>;
        setMessageReaction(params: SetMessageReactionParams): Promise<boolean>;
        setMyCommands(params: SetMyCommandsParams): Promise<boolean>;
        setMyDefaultAdministratorRights(
            params: SetMyDefaultAdministratorRightsParams,
        ): Promise<boolean>;
        setMyDescription(params: SetMyDescriptionParams): Promise<boolean>;
        setMyName(params: SetMyNameParams): Promise<boolean>;
        setMyProfilePhoto(params: SetMyProfilePhotoParams): Promise<boolean>;
        setMyShortDescription(
            params: SetMyShortDescriptionParams,
        ): Promise<boolean>;
        setPassportDataErrors(
            params: SetPassportDataErrorsParams,
        ): Promise<boolean>;
        setStickerEmojiList(params: SetStickerEmojiListParams): Promise<boolean>;
        setStickerKeywords(params: SetStickerKeywordsParams): Promise<boolean>;
        setStickerMaskPosition(
            params: SetStickerMaskPositionParams,
        ): Promise<boolean>;
        setStickerPositionInSet(
            params: SetStickerPositionInSetParams,
        ): Promise<boolean>;
        setStickerSetThumbnail(
            params: SetStickerSetThumbnailParams,
        ): Promise<boolean>;
        setStickerSetTitle(params: SetStickerSetTitleParams): Promise<boolean>;
        setUserEmojiStatus(params: SetUserEmojiStatusParams): Promise<boolean>;
        setWebhook(params: SetWebhookParams): Promise<boolean>;
        stopMessageLiveLocation(
            params: StopMessageLiveLocationParams,
        ): Promise<boolean | Message>;
        stopPoll(params: StopPollParams): Promise<Poll>;
        transferBusinessAccountStars(
            params: TransferBusinessAccountStarsParams,
        ): Promise<boolean>;
        transferGift(params: TransferGiftParams): Promise<boolean>;
        unbanChatMember(params: UnbanChatMemberParams): Promise<boolean>;
        unbanChatSenderChat(params: UnbanChatSenderChatParams): Promise<boolean>;
        unhideGeneralForumTopic(
            params: UnhideGeneralForumTopicParams,
        ): Promise<boolean>;
        unpinAllChatMessages(params: UnpinAllChatMessagesParams): Promise<boolean>;
        unpinAllForumTopicMessages(
            params: UnpinAllForumTopicMessagesParams,
        ): Promise<boolean>;
        unpinAllGeneralForumTopicMessages(
            params: UnpinAllGeneralForumTopicMessagesParams,
        ): Promise<boolean>;
        unpinChatMessage(params: UnpinChatMessageParams): Promise<boolean>;
        upgradeGift(params: UpgradeGiftParams): Promise<boolean>;
        uploadStickerFile(params: UploadStickerFileParams): Promise<File>;
        verifyChat(params: VerifyChatParams): Promise<boolean>;
        verifyUser(params: VerifyUserParams): Promise<boolean>;
    }
    Index

    Methods

    addStickerToSet answerCallbackQuery answerGuestQuery answerInlineQuery answerPreCheckoutQuery answerShippingQuery answerWebAppQuery approveChatJoinRequest approveSuggestedPost banChatMember banChatSenderChat close closeForumTopic closeGeneralForumTopic convertGiftToStars copyMessage copyMessages createChatInviteLink createChatSubscriptionInviteLink createForumTopic createInvoiceLink createNewStickerSet declineChatJoinRequest declineSuggestedPost deleteAllMessageReactions deleteBusinessMessages deleteChatPhoto deleteChatStickerSet deleteForumTopic deleteMessage deleteMessageReaction deleteMessages deleteMyCommands deleteStickerFromSet deleteStickerSet deleteStory deleteWebhook editChatInviteLink editChatSubscriptionInviteLink editForumTopic editGeneralForumTopic editMessageCaption editMessageChecklist editMessageLiveLocation editMessageMedia editMessageReplyMarkup editMessageText editStory editUserStarSubscription exportChatInviteLink forwardMessage forwardMessages getAvailableGifts getBusinessAccountGifts getBusinessAccountStarBalance getBusinessConnection getChat getChatAdministrators getChatGifts getChatMember getChatMemberCount getChatMenuButton getCustomEmojiStickers getFile getForumTopicIconStickers getGameHighScores getManagedBotAccessSettings getManagedBotToken getMe getMyCommands getMyDefaultAdministratorRights getMyDescription getMyName getMyShortDescription getMyStarBalance getStarTransactions getStickerSet getUpdates getUserChatBoosts getUserGifts getUserPersonalChatMessages getUserProfileAudios getUserProfilePhotos getWebhookInfo giftPremiumSubscription hideGeneralForumTopic leaveChat logOut pinChatMessage postStory promoteChatMember readBusinessMessage refundStarPayment removeBusinessAccountProfilePhoto removeChatVerification removeMyProfilePhoto removeUserVerification reopenForumTopic reopenGeneralForumTopic replaceManagedBotToken replaceStickerInSet repostStory restrictChatMember revokeChatInviteLink savePreparedInlineMessage savePreparedKeyboardButton sendAnimation sendAudio sendChatAction sendChecklist sendContact sendDice sendDocument sendGame sendGift sendInvoice sendLivePhoto sendLocation sendMediaGroup sendMessage sendMessageDraft sendPaidMedia sendPhoto sendPoll sendSticker sendVenue sendVideo sendVideoNote sendVoice setBusinessAccountBio setBusinessAccountGiftSettings setBusinessAccountName setBusinessAccountProfilePhoto setBusinessAccountUsername setChatAdministratorCustomTitle setChatDescription setChatMemberTag setChatMenuButton setChatPermissions setChatPhoto setChatStickerSet setChatTitle setCustomEmojiStickerSetThumbnail setGameScore setManagedBotAccessSettings setMessageReaction setMyCommands setMyDefaultAdministratorRights setMyDescription setMyName setMyProfilePhoto setMyShortDescription setPassportDataErrors setStickerEmojiList setStickerKeywords setStickerMaskPosition setStickerPositionInSet setStickerSetThumbnail setStickerSetTitle setUserEmojiStatus setWebhook stopMessageLiveLocation stopPoll transferBusinessAccountStars transferGift unbanChatMember unbanChatSenderChat unhideGeneralForumTopic unpinAllChatMessages unpinAllForumTopicMessages unpinAllGeneralForumTopicMessages unpinChatMessage upgradeGift uploadStickerFile verifyChat verifyUser

    Methods

    • Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.

      Parameters

      Returns Promise<boolean>

    • Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.

      Returns Promise<boolean>

    • If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.

      Parameters

      Returns Promise<boolean>

    • Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.

      Returns Promise<boolean>

    • Use this method to close an open 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, unless it is the creator of the topic. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to close an open 'General' 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 True on success.

      Returns Promise<boolean>

    • Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.

      Parameters

      Returns Promise<MessageId>

    • Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.

      Parameters

      Returns Promise<MessageId[]>

    • Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.

      Parameters

      Returns Promise<ForumTopic>

    • 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

      Returns Promise<boolean>

    • Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.

      Returns Promise<boolean>

    • Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to delete a message, including service messages, with the following limitations:,- A message can only be deleted if it was sent less than 48 hours ago.,- Service messages about a supergroup, channel, or forum topic creation can't be deleted.,- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.,- Bots can delete outgoing messages in private chats, groups, and supergroups.,- Bots can delete incoming messages in private chats.,- Bots granted can_post_messages permissions can delete outgoing messages in channels.,- If the bot is an administrator of a group, it can delete any message there.,- If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.,- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.,Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to edit the name of the 'General' 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 True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

      Parameters

      Returns Promise<boolean | Message>

    • Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

      Returns Promise<boolean | Message>

    • Use this method to edit animation, audio, document, live photo, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo, a live photo, or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

      Parameters

      Returns Promise<boolean | Message>

    • Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

      Returns Promise<boolean | Message>

    • Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

      Parameters

      Returns Promise<boolean | Message>

    • Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.

      Parameters

      Returns Promise<string>

    • Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.

      Parameters

      Returns Promise<MessageId[]>

    • Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.

      Returns Promise<Gifts>

    • Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.,Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.

      Parameters

      Returns Promise<File>

    • Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.

      Returns Promise<Sticker[]>

    • A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.

      Returns Promise<User>

    • A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.

      Returns Promise<StarAmount>

    • Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.

      Returns Promise<WebhookInfo>

    • Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.

      Returns Promise<boolean>

    • Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Removes the profile photo of the bot. Requires no parameters. Returns True on success.

      Returns Promise<boolean>

    • Use this method to reopen a closed 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, unless it is the creator of the topic. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns True on success.

      Returns Promise<boolean>

    • Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.

      Parameters

      Returns Promise<Story>

    • Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

      Parameters

      Returns Promise<Message>

    • Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.,For sending voice messages, use the sendVoice method instead.

      Parameters

      Returns Promise<Message>

    • Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.,We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.

      Parameters

      Returns Promise<boolean>

    • 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

      Returns Promise<boolean>

    • Use this method to send a group of photos, live photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.

      Parameters

      Returns Promise<Message[]>

    • Use this method to stream a partial message to a user while the message is being generated. Note that the streamed draft is ephemeral and acts as a temporary 30-second preview - once the output is finalized, you must call sendMessage with the complete message to persist it in the user's chat. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

      Parameters

      Returns Promise<Message>

    • Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

      Parameters

      Returns Promise<Message>

    • Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the can_manage_tags administrator right. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

      Parameters

      Returns Promise<boolean | Message>

    • Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success.

      Returns Promise<boolean>

    • Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.,Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

      Parameters

      Returns Promise<boolean>

    • Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.,If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header "X-Telegram-Bot-Api-Secret-Token" with the secret token as content.

      Parameters

      Returns Promise<boolean>

    • Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to unhide the 'General' 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 True on success.

      Returns Promise<boolean>

    • Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

      Returns Promise<boolean>

    • Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns True on success.

      Parameters

      Returns Promise<boolean>

    • Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.

      Parameters

      Returns Promise<boolean>