tgbot-cpp
Loading...
Searching...
No Matches
ApiMethods.inc.h
Go to the documentation of this file.
1// Generated by `make api-generate`. Do not edit.
2
16 bool addStickerToSet(std::int64_t userId, const std::string& name, std::shared_ptr<InputSticker> sticker) const;
17
39 bool answerCallbackQuery(const std::string& callbackQueryId, const std::string& text = "", bool showAlert = false,
40 const std::string& url = "", std::int32_t cacheTime = 0) const;
41
52 bool answerChatJoinRequestQuery(const std::string& chatJoinRequestQueryId, const std::string& result) const;
53
63 std::shared_ptr<SentGuestMessage> answerGuestQuery(const std::string& guestQueryId,
64 std::shared_ptr<InlineQueryResult> result) const;
65
86 bool answerInlineQuery(const std::string& inlineQueryId,
87 const std::vector<std::shared_ptr<InlineQueryResult>>& results, std::int32_t cacheTime = 300,
88 bool isPersonal = false, const std::string& nextOffset = "",
89 std::shared_ptr<InlineQueryResultsButton> button = nullptr) const;
90
110 bool answerPreCheckoutQuery(const std::string& preCheckoutQueryId, bool ok,
111 const std::string& errorMessage = "") const;
112
131 bool answerShippingQuery(const std::string& shippingQueryId, bool ok,
132 const std::vector<std::shared_ptr<ShippingOption>>& shippingOptions = { },
133 const std::string& errorMessage = "") const;
134
145 std::shared_ptr<SentWebAppMessage> answerWebAppQuery(const std::string& webAppQueryId,
146 std::shared_ptr<InlineQueryResult> result) const;
147
159 bool approveChatJoinRequest(std::variant<std::int64_t, std::string> chatId, std::int64_t userId) const;
160
175 bool approveSuggestedPost(std::variant<std::int64_t, std::string> chatId, std::int32_t messageId,
176 std::int32_t sendDate = 0) const;
177
199 bool banChatMember(std::variant<std::int64_t, std::string> chatId, std::int64_t userId, std::int32_t untilDate = 0,
200 bool revokeMessages = true) const;
201
215 bool banChatSenderChat(std::variant<std::int64_t, std::string> chatId, std::int64_t senderChatId) const;
216
227 bool close() const;
228
240 bool closeForumTopic(std::variant<std::int64_t, std::string> chatId, std::int32_t messageThreadId) const;
241
252 bool closeGeneralForumTopic(std::variant<std::int64_t, std::string> chatId) const;
253
264 bool convertGiftToStars(const std::string& businessConnectionId, const std::string& ownedGiftId) const;
265
313 std::shared_ptr<MessageId>
314 copyMessage(std::variant<std::int64_t, std::string> chatId, std::variant<std::int64_t, std::string> fromChatId,
315 std::int32_t messageId, const std::string& caption = "", const std::string& parseMode = "",
316 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
317 bool disableNotification = false, std::shared_ptr<ReplyParameters> replyParameters = nullptr,
318 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
319 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
320 replyMarkup = { },
321 bool protectContent = false, std::int32_t messageThreadId = 0, bool allowPaidBroadcast = false,
322 std::int64_t directMessagesTopicId = 0, const std::string& messageEffectId = "",
323 bool showCaptionAboveMedia = false,
324 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr,
325 std::int32_t videoStartTimestamp = 0) const;
326
356 std::vector<std::shared_ptr<MessageId>>
357 copyMessages(std::variant<std::int64_t, std::string> chatId, std::variant<std::int64_t, std::string> fromChatId,
358 const std::vector<std::int32_t>& messageIds, std::int32_t messageThreadId = 0,
359 bool disableNotification = false, bool protectContent = false, bool removeCaption = false,
360 std::int64_t directMessagesTopicId = 0) const;
361
379 std::shared_ptr<ChatInviteLink> createChatInviteLink(std::variant<std::int64_t, std::string> chatId,
380 std::int32_t expireDate = 0, std::int32_t memberLimit = 0,
381 const std::string& name = "",
382 bool createsJoinRequest = false) const;
383
400 std::shared_ptr<ChatInviteLink> createChatSubscriptionInviteLink(std::variant<std::int64_t, std::string> chatId,
401 std::int32_t subscriptionPeriod,
402 std::int32_t subscriptionPrice,
403 const std::string& name = "") const;
404
422 std::shared_ptr<ForumTopic> createForumTopic(std::variant<std::int64_t, std::string> chatId,
423 const std::string& name, std::int32_t iconColor = 0,
424 const std::string& iconCustomEmojiId = "") const;
425
485 std::string
486 createInvoiceLink(const std::string& title, const std::string& description, const std::string& payload,
487 const std::string& providerToken, const std::string& currency,
488 const std::vector<std::shared_ptr<LabeledPrice>>& prices, std::int32_t maxTipAmount = 0,
489 const std::vector<std::int32_t>& suggestedTipAmounts = { }, const std::string& providerData = "",
490 const std::string& photoUrl = "", std::int32_t photoSize = 0, std::int32_t photoWidth = 0,
491 std::int32_t photoHeight = 0, bool needName = false, bool needPhoneNumber = false,
492 bool needEmail = false, bool needShippingAddress = false, bool sendPhoneNumberToProvider = false,
493 bool sendEmailToProvider = false, bool isFlexible = false,
494 const std::string& businessConnectionId = "", std::int32_t subscriptionPeriod = 0) const;
495
518 bool createNewStickerSet(std::int64_t userId, const std::string& name, const std::string& title,
519 const std::vector<std::shared_ptr<InputSticker>>& stickers,
520 Sticker::Type stickerType = Sticker::Type::Regular, bool needsRepainting = false) const;
521
533 bool declineChatJoinRequest(std::variant<std::int64_t, std::string> chatId, std::int64_t userId) const;
534
546 bool declineSuggestedPost(std::variant<std::int64_t, std::string> chatId, std::int32_t messageId,
547 const std::string& comment = "") const;
548
564 bool deleteAllMessageReactions(std::variant<std::int64_t, std::string> chatId, std::int64_t actorChatId = 0,
565 std::int64_t userId = 0) const;
566
581 bool deleteBusinessMessages(const std::string& businessConnectionId,
582 const std::vector<std::int32_t>& messageIds) const;
583
594 bool deleteChatPhoto(std::variant<std::int64_t, std::string> chatId) const;
595
607 bool deleteChatStickerSet(std::variant<std::int64_t, std::string> chatId) const;
608
621 bool deleteEphemeralMessage(std::variant<std::int64_t, std::string> chatId, std::int32_t ephemeralMessageId,
622 std::int64_t receiverUserId) const;
623
636 bool deleteForumTopic(std::variant<std::int64_t, std::string> chatId, std::int32_t messageThreadId) const;
637
657 bool deleteMessage(std::variant<std::int64_t, std::string> chatId, std::int32_t messageId) const;
658
674 bool deleteMessageReaction(std::variant<std::int64_t, std::string> chatId, std::int32_t messageId,
675 std::int64_t actorChatId = 0, std::int64_t userId = 0) const;
676
688 bool deleteMessages(std::variant<std::int64_t, std::string> chatId,
689 const std::vector<std::int32_t>& messageIds) const;
690
704 bool deleteMyCommands(std::shared_ptr<BotCommandScope> scope = nullptr, const std::string& languageCode = "") const;
705
714 bool deleteStickerFromSet(const std::string& sticker) const;
715
725 bool deleteStickerSet(const std::string& name) const;
726
736 bool deleteStory(const std::string& businessConnectionId, std::int32_t storyId) const;
737
746 bool deleteWebhook(bool dropPendingUpdates = false) const;
747
765 std::shared_ptr<ChatInviteLink> editChatInviteLink(std::variant<std::int64_t, std::string> chatId,
766 const std::string& inviteLink, std::int32_t expireDate = 0,
767 std::int32_t memberLimit = 0, const std::string& name = "",
768 bool createsJoinRequest = false) const;
769
782 std::shared_ptr<ChatInviteLink> editChatSubscriptionInviteLink(std::variant<std::int64_t, std::string> chatId,
783 const std::string& inviteLink,
784 const std::string& name = "") const;
785
804 bool editEphemeralMessageCaption(std::variant<std::int64_t, std::string> chatId, std::int32_t ephemeralMessageId,
805 std::int64_t receiverUserId, const std::string& caption = "",
806 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
807 const std::string& parseMode = "",
808 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr) const;
809
826 bool editEphemeralMessageMedia(std::variant<std::int64_t, std::string> chatId, std::int32_t ephemeralMessageId,
827 std::shared_ptr<InputMedia> media, std::int64_t receiverUserId,
828 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr) const;
829
843 bool editEphemeralMessageReplyMarkup(std::variant<std::int64_t, std::string> chatId,
844 std::int32_t ephemeralMessageId, std::int64_t receiverUserId,
845 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr) const;
846
866 bool editEphemeralMessageText(std::variant<std::int64_t, std::string> chatId, std::int32_t ephemeralMessageId,
867 std::int64_t receiverUserId, const std::string& text,
868 const std::vector<std::shared_ptr<MessageEntity>>& entities = { },
869 std::shared_ptr<LinkPreviewOptions> linkPreviewOptions = nullptr,
870 const std::string& parseMode = "",
871 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr) const;
872
891 bool editForumTopic(std::variant<std::int64_t, std::string> chatId, std::int32_t messageThreadId,
892 const std::string& name = "", const std::string& iconCustomEmojiId = "") const;
893
905 bool editGeneralForumTopic(std::variant<std::int64_t, std::string> chatId, const std::string& name) const;
906
933 std::shared_ptr<Message>
934 editMessageCaption(std::variant<std::int64_t, std::string> chatId = { }, std::int32_t messageId = 0,
935 const std::string& caption = "", const std::string& inlineMessageId = "",
936 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr, const std::string& parseMode = "",
937 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
938 const std::string& businessConnectionId = "", bool showCaptionAboveMedia = false) const;
939
954 std::shared_ptr<Message> editMessageChecklist(std::variant<std::int64_t, std::string> chatId,
955 const std::string& businessConnectionId,
956 std::shared_ptr<InputChecklist> checklist, std::int32_t messageId,
957 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr) const;
958
991 std::shared_ptr<Message>
992 editMessageLiveLocation(double latitude, double longitude, std::variant<std::int64_t, std::string> chatId = { },
993 std::int32_t messageId = 0, const std::string& inlineMessageId = "",
994 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr, double horizontalAccuracy = 0,
995 std::int32_t heading = 0, std::int32_t proximityAlertRadius = 0,
996 const std::string& businessConnectionId = "", std::int32_t livePeriod = 0) const;
997
1023 std::shared_ptr<Message> editMessageMedia(std::shared_ptr<InputMedia> media,
1024 std::variant<std::int64_t, std::string> chatId = { },
1025 std::int32_t messageId = 0, const std::string& inlineMessageId = "",
1026 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr,
1027 const std::string& businessConnectionId = "") const;
1028
1048 std::shared_ptr<Message> editMessageReplyMarkup(std::variant<std::int64_t, std::string> chatId = { },
1049 std::int32_t messageId = 0, const std::string& inlineMessageId = "",
1050 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr,
1051 const std::string& businessConnectionId = "") const;
1052
1082 std::shared_ptr<Message> editMessageText(const std::string& text = "",
1083 std::variant<std::int64_t, std::string> chatId = { },
1084 std::int32_t messageId = 0, const std::string& inlineMessageId = "",
1085 const std::string& parseMode = "",
1086 std::shared_ptr<LinkPreviewOptions> linkPreviewOptions = nullptr,
1087 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr,
1088 const std::vector<std::shared_ptr<MessageEntity>>& entities = { },
1089 const std::string& businessConnectionId = "",
1090 std::shared_ptr<InputRichMessage> richMessage = nullptr) const;
1091
1108 std::shared_ptr<Story> editStory(const std::string& businessConnectionId,
1109 std::shared_ptr<InputStoryContent> content, std::int32_t storyId,
1110 const std::vector<std::shared_ptr<StoryArea>>& areas = { },
1111 const std::string& caption = "",
1112 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
1113 const std::string& parseMode = "") const;
1114
1128 bool editUserStarSubscription(bool isCanceled, const std::string& telegramPaymentChargeId,
1129 std::int64_t userId) const;
1130
1142 std::string exportChatInviteLink(std::variant<std::int64_t, std::string> chatId) const;
1143
1172 std::shared_ptr<Message> forwardMessage(std::variant<std::int64_t, std::string> chatId,
1173 std::variant<std::int64_t, std::string> fromChatId, std::int32_t messageId,
1174 bool disableNotification = false, bool protectContent = false,
1175 std::int32_t messageThreadId = 0, std::int64_t directMessagesTopicId = 0,
1176 const std::string& messageEffectId = "",
1177 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr,
1178 std::int32_t videoStartTimestamp = 0) const;
1179
1207 std::vector<std::shared_ptr<MessageId>>
1208 forwardMessages(std::variant<std::int64_t, std::string> chatId, std::variant<std::int64_t, std::string> fromChatId,
1209 const std::vector<std::int32_t>& messageIds, std::int32_t messageThreadId = 0,
1210 bool disableNotification = false, bool protectContent = false,
1211 std::int64_t directMessagesTopicId = 0) const;
1212
1220 std::shared_ptr<Gifts> getAvailableGifts() const;
1221
1247 std::shared_ptr<OwnedGifts>
1248 getBusinessAccountGifts(const std::string& businessConnectionId, bool excludeFromBlockchain = false,
1249 bool excludeLimitedNonUpgradable = false, bool excludeLimitedUpgradable = false,
1250 bool excludeSaved = false, bool excludeUnique = false, bool excludeUnlimited = false,
1251 bool excludeUnsaved = false, std::int32_t limit = 0, const std::string& offset = "",
1252 bool sortByPrice = false) const;
1253
1262 std::shared_ptr<StarAmount> getBusinessAccountStarBalance(const std::string& businessConnectionId) const;
1263
1272 std::shared_ptr<BusinessConnection> getBusinessConnection(const std::string& businessConnectionId) const;
1273
1283 std::shared_ptr<ChatFullInfo> getChat(std::variant<std::int64_t, std::string> chatId) const;
1284
1296 std::vector<std::shared_ptr<ChatMember>> getChatAdministrators(std::variant<std::int64_t, std::string> chatId,
1297 bool returnBots = false) const;
1298
1327 std::shared_ptr<OwnedGifts> getChatGifts(std::variant<std::int64_t, std::string> chatId,
1328 bool excludeFromBlockchain = false,
1329 bool excludeLimitedNonUpgradable = false,
1330 bool excludeLimitedUpgradable = false, bool excludeSaved = false,
1331 bool excludeUnique = false, bool excludeUnlimited = false,
1332 bool excludeUnsaved = false, std::int32_t limit = 0,
1333 const std::string& offset = "", bool sortByPrice = false) const;
1334
1346 std::shared_ptr<ChatMember> getChatMember(std::variant<std::int64_t, std::string> chatId,
1347 std::int64_t userId) const;
1348
1357 std::int32_t getChatMemberCount(std::variant<std::int64_t, std::string> chatId) const;
1358
1368 std::shared_ptr<MenuButton> getChatMenuButton(std::variant<std::int64_t, std::string> chatId = { }) const;
1369
1379 std::vector<std::shared_ptr<Sticker>> getCustomEmojiStickers(const std::vector<std::string>& customEmojiIds) const;
1380
1395 std::shared_ptr<File> getFile(const std::string& fileId) const;
1396
1404 std::vector<std::shared_ptr<Sticker>> getForumTopicIconStickers() const;
1405
1421 std::vector<std::shared_ptr<GameHighScore>> getGameHighScores(std::int64_t userId,
1422 std::variant<std::int64_t, std::string> chatId = { },
1423 std::int32_t messageId = 0,
1424 const std::string& inlineMessageId = "") const;
1425
1435 std::shared_ptr<BotAccessSettings> getManagedBotAccessSettings(std::int64_t userId) const;
1436
1445 std::string getManagedBotToken(std::int64_t userId) const;
1446
1454 std::shared_ptr<User> getMe() const;
1455
1467 std::vector<std::shared_ptr<BotCommand>> getMyCommands(std::shared_ptr<BotCommandScope> scope = nullptr,
1468 const std::string& languageCode = "") const;
1469
1480 std::shared_ptr<ChatAdministratorRights> getMyDefaultAdministratorRights(bool forChannels = false) const;
1481
1490 std::shared_ptr<BotDescription> getMyDescription(const std::string& languageCode = "") const;
1491
1500 std::shared_ptr<BotName> getMyName(const std::string& languageCode = "") const;
1501
1510 std::shared_ptr<BotShortDescription> getMyShortDescription(const std::string& languageCode = "") const;
1511
1519 std::shared_ptr<StarAmount> getMyStarBalance() const;
1520
1531 std::shared_ptr<StarTransactions> getStarTransactions(std::int32_t limit = 0, std::int32_t offset = 0) const;
1532
1540 std::shared_ptr<StickerSet> getStickerSet(const std::string& name) const;
1541
1570 std::vector<std::shared_ptr<Update>> getUpdates(std::int32_t offset = 0, std::int32_t limit = 100,
1571 std::int32_t timeout = 0,
1572 const std::vector<std::string>& allowedUpdates = { }) const;
1573
1584 std::shared_ptr<UserChatBoosts> getUserChatBoosts(std::variant<std::int64_t, std::string> chatId,
1585 std::int64_t userId) const;
1586
1608 std::shared_ptr<OwnedGifts> getUserGifts(std::int64_t userId, bool excludeFromBlockchain = false,
1609 bool excludeLimitedNonUpgradable = false,
1610 bool excludeLimitedUpgradable = false, bool excludeUnique = false,
1611 bool excludeUnlimited = false, std::int32_t limit = 0,
1612 const std::string& offset = "", bool sortByPrice = false) const;
1613
1624 std::vector<std::shared_ptr<Message>> getUserPersonalChatMessages(std::int32_t limit, std::int64_t userId) const;
1625
1638 std::shared_ptr<UserProfileAudios> getUserProfileAudios(std::int64_t userId, std::int32_t limit = 0,
1639 std::int32_t offset = 0) const;
1640
1653 std::shared_ptr<UserProfilePhotos> getUserProfilePhotos(std::int64_t userId, std::int32_t offset = 0,
1654 std::int32_t limit = 100) const;
1655
1664 std::shared_ptr<WebhookInfo> getWebhookInfo() const;
1665
1687 bool giftPremiumSubscription(std::int32_t monthCount, std::int32_t starCount, std::int64_t userId,
1688 const std::string& text = "",
1689 const std::vector<std::shared_ptr<MessageEntity>>& textEntities = { },
1690 const std::string& textParseMode = "") const;
1691
1703 bool hideGeneralForumTopic(std::variant<std::int64_t, std::string> chatId) const;
1704
1715 bool leaveChat(std::variant<std::int64_t, std::string> chatId) const;
1716
1727 bool logOut() const;
1728
1747 bool pinChatMessage(std::variant<std::int64_t, std::string> chatId, std::int32_t messageId,
1748 const std::string& businessConnectionId = "", bool disableNotification = false) const;
1749
1770 std::shared_ptr<Story>
1771 postStory(std::int32_t activePeriod, const std::string& businessConnectionId,
1772 std::shared_ptr<InputStoryContent> content, const std::vector<std::shared_ptr<StoryArea>>& areas = { },
1773 const std::string& caption = "", const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
1774 const std::string& parseMode = "", bool postToChatPage = false, bool protectContent = false) const;
1775
1821 bool promoteChatMember(std::variant<std::int64_t, std::string> chatId, std::int64_t userId,
1822 bool canChangeInfo = false, bool canPostMessages = false, bool canEditMessages = false,
1823 bool canDeleteMessages = false, bool canInviteUsers = false, bool canPinMessages = false,
1824 bool canPromoteMembers = false, bool isAnonymous = false, bool canManageChat = false,
1825 bool canManageVideoChats = false, bool canRestrictMembers = false,
1826 bool canManageTopics = false, bool canPostStories = false, bool canEditStories = false,
1827 bool canDeleteStories = false, bool canManageDirectMessages = false,
1828 bool canManageTags = false) const;
1829
1842 bool readBusinessMessage(std::variant<std::int64_t, std::string> chatId, const std::string& businessConnectionId,
1843 std::int32_t messageId) const;
1844
1853 bool refundStarPayment(const std::string& telegramPaymentChargeId, std::int64_t userId) const;
1854
1867 bool removeBusinessAccountProfilePhoto(const std::string& businessConnectionId, bool isPublic = false) const;
1868
1878 bool removeChatVerification(std::variant<std::int64_t, std::string> chatId) const;
1879
1887
1896 bool removeUserVerification(std::int64_t userId) const;
1897
1909 bool reopenForumTopic(std::variant<std::int64_t, std::string> chatId, std::int32_t messageThreadId) const;
1910
1922 bool reopenGeneralForumTopic(std::variant<std::int64_t, std::string> chatId) const;
1923
1932 std::string replaceManagedBotToken(std::int64_t userId) const;
1933
1948 bool replaceStickerInSet(std::int64_t userId, const std::string& name, const std::string& oldSticker,
1949 std::shared_ptr<InputSticker> sticker) const;
1950
1969 std::shared_ptr<Story> repostStory(std::int32_t activePeriod, const std::string& businessConnectionId,
1970 std::variant<std::int64_t, std::string> fromChatId, std::int32_t fromStoryId,
1971 bool postToChatPage = false, bool protectContent = false) const;
1972
1994 bool restrictChatMember(std::variant<std::int64_t, std::string> chatId, std::int64_t userId,
1995 std::shared_ptr<ChatPermissions> permissions, std::int32_t untilDate = 0,
1996 bool useIndependentChatPermissions = false) const;
1997
2010 std::shared_ptr<ChatInviteLink> revokeChatInviteLink(std::variant<std::int64_t, std::string> chatId,
2011 const std::string& inviteLink) const;
2012
2026 std::shared_ptr<PreparedInlineMessage> savePreparedInlineMessage(std::shared_ptr<InlineQueryResult> result,
2027 std::int64_t userId, bool allowBotChats = false,
2028 bool allowChannelChats = false,
2029 bool allowGroupChats = false,
2030 bool allowUserChats = false) const;
2031
2042 std::shared_ptr<PreparedKeyboardButton> savePreparedKeyboardButton(std::shared_ptr<KeyboardButton> button,
2043 std::int64_t userId) const;
2044
2108 std::shared_ptr<Message> sendAnimation(
2109 std::variant<std::int64_t, std::string> chatId, std::variant<std::shared_ptr<InputFile>, std::string> animation,
2110 std::int32_t duration = 0, std::int32_t width = 0, std::int32_t height = 0,
2111 std::variant<std::shared_ptr<InputFile>, std::string> thumbnail = { }, const std::string& caption = "",
2112 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2113 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2114 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2115 replyMarkup = { },
2116 const std::string& parseMode = "", bool disableNotification = false,
2117 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { }, std::int32_t messageThreadId = 0,
2118 bool protectContent = false, bool hasSpoiler = false, const std::string& businessConnectionId = "",
2119 bool allowPaidBroadcast = false, const std::string& callbackQueryId = "",
2120 std::int64_t directMessagesTopicId = 0, const std::string& messageEffectId = "",
2121 std::int64_t receiverUserId = 0, bool showCaptionAboveMedia = false,
2122 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2123
2185 std::shared_ptr<Message> sendAudio(
2186 std::variant<std::int64_t, std::string> chatId, std::variant<std::shared_ptr<InputFile>, std::string> audio,
2187 const std::string& caption = "", std::int32_t duration = 0, const std::string& performer = "",
2188 const std::string& title = "", std::variant<std::shared_ptr<InputFile>, std::string> thumbnail = { },
2189 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2190 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2191 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2192 replyMarkup = { },
2193 const std::string& parseMode = "", bool disableNotification = false,
2194 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { }, std::int32_t messageThreadId = 0,
2195 bool protectContent = false, const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
2196 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
2197 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
2198 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2199
2223 bool sendChatAction(std::variant<std::int64_t, std::string> chatId, const std::string& action,
2224 std::int32_t messageThreadId = 0, const std::string& businessConnectionId = "") const;
2225
2238 bool sendChatJoinRequestWebApp(const std::string& chatJoinRequestQueryId, const std::string& webAppUrl) const;
2239
2258 std::shared_ptr<Message> sendChecklist(std::variant<std::int64_t, std::string> chatId,
2259 const std::string& businessConnectionId,
2260 std::shared_ptr<InputChecklist> checklist, bool disableNotification = false,
2261 const std::string& messageEffectId = "", bool protectContent = false,
2262 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr,
2263 std::shared_ptr<ReplyParameters> replyParameters = nullptr) const;
2264
2306 std::shared_ptr<Message>
2307 sendContact(std::variant<std::int64_t, std::string> chatId, const std::string& phoneNumber,
2308 const std::string& firstName, const std::string& lastName = "", const std::string& vcard = "",
2309 bool disableNotification = false, std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2310 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2311 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2312 replyMarkup = { },
2313 std::int32_t messageThreadId = 0, bool protectContent = false,
2314 const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
2315 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
2316 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
2317 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2318
2354 std::shared_ptr<Message>
2355 sendDice(std::variant<std::int64_t, std::string> chatId, bool disableNotification = false,
2356 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2357 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2358 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2359 replyMarkup = { },
2360 const std::string& emoji = "", std::int32_t messageThreadId = 0, bool protectContent = false,
2361 const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
2362 std::int64_t directMessagesTopicId = 0, const std::string& messageEffectId = "",
2363 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2364
2424 std::shared_ptr<Message> sendDocument(
2425 std::variant<std::int64_t, std::string> chatId, std::variant<std::shared_ptr<InputFile>, std::string> document,
2426 std::variant<std::shared_ptr<InputFile>, std::string> thumbnail = { }, const std::string& caption = "",
2427 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2428 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2429 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2430 replyMarkup = { },
2431 const std::string& parseMode = "", bool disableNotification = false,
2432 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
2433 bool disableContentTypeDetection = false, std::int32_t messageThreadId = 0, bool protectContent = false,
2434 const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
2435 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
2436 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
2437 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2438
2467 std::shared_ptr<Message> sendGame(std::variant<std::int64_t, std::string> chatId, const std::string& gameShortName,
2468 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2469 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr,
2470 bool disableNotification = false, std::int32_t messageThreadId = 0,
2471 bool protectContent = false, const std::string& businessConnectionId = "",
2472 bool allowPaidBroadcast = false, const std::string& messageEffectId = "") const;
2473
2497 bool sendGift(const std::string& giftId, std::variant<std::int64_t, std::string> chatId = { },
2498 bool payForUpgrade = false, const std::string& text = "",
2499 const std::vector<std::shared_ptr<MessageEntity>>& textEntities = { },
2500 const std::string& textParseMode = "", std::int64_t userId = 0) const;
2501
2582 std::shared_ptr<Message>
2583 sendInvoice(std::variant<std::int64_t, std::string> chatId, const std::string& title,
2584 const std::string& description, const std::string& payload, const std::string& providerToken,
2585 const std::string& currency, const std::vector<std::shared_ptr<LabeledPrice>>& prices,
2586 const std::string& providerData = "", const std::string& photoUrl = "", std::int32_t photoSize = 0,
2587 std::int32_t photoWidth = 0, std::int32_t photoHeight = 0, bool needName = false,
2588 bool needPhoneNumber = false, bool needEmail = false, bool needShippingAddress = false,
2589 bool sendPhoneNumberToProvider = false, bool sendEmailToProvider = false, bool isFlexible = false,
2590 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2591 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr, bool disableNotification = false,
2592 std::int32_t messageThreadId = 0, std::int32_t maxTipAmount = 0,
2593 const std::vector<std::int32_t>& suggestedTipAmounts = { }, const std::string& startParameter = "",
2594 bool protectContent = false, bool allowPaidBroadcast = false, std::int64_t directMessagesTopicId = 0,
2595 const std::string& messageEffectId = "",
2596 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2597
2652 std::shared_ptr<Message> sendLivePhoto(
2653 std::variant<std::int64_t, std::string> chatId, std::variant<std::shared_ptr<InputFile>, std::string> livePhoto,
2654 std::variant<std::shared_ptr<InputFile>, std::string> photo, bool allowPaidBroadcast = false,
2655 const std::string& businessConnectionId = "", const std::string& callbackQueryId = "",
2656 const std::string& caption = "", const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
2657 std::int64_t directMessagesTopicId = 0, bool disableNotification = false, bool hasSpoiler = false,
2658 const std::string& messageEffectId = "", std::int32_t messageThreadId = 0, const std::string& parseMode = "",
2659 bool protectContent = false, std::int64_t receiverUserId = 0,
2660 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2661 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2662 replyMarkup = { },
2663 std::shared_ptr<ReplyParameters> replyParameters = nullptr, bool showCaptionAboveMedia = false,
2664 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2665
2715 std::shared_ptr<Message>
2716 sendLocation(std::variant<std::int64_t, std::string> chatId, double latitude, double longitude,
2717 std::int32_t livePeriod = 0, std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2718 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2719 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2720 replyMarkup = { },
2721 bool disableNotification = false, double horizontalAccuracy = 0, std::int32_t heading = 0,
2722 std::int32_t proximityAlertRadius = 0, std::int32_t messageThreadId = 0, bool protectContent = false,
2723 const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
2724 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
2725 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
2726 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2727
2756 std::vector<std::shared_ptr<Message>> sendMediaGroup(
2757 std::variant<std::int64_t, std::string> chatId,
2758 const std::vector<std::variant<std::shared_ptr<InputMediaAudio>, std::shared_ptr<InputMediaDocument>,
2759 std::shared_ptr<InputMediaLivePhoto>, std::shared_ptr<InputMediaPhoto>,
2760 std::shared_ptr<InputMediaVideo>>>& media,
2761 bool disableNotification = false, std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2762 std::int32_t messageThreadId = 0, bool protectContent = false, const std::string& businessConnectionId = "",
2763 bool allowPaidBroadcast = false, std::int64_t directMessagesTopicId = 0,
2764 const std::string& messageEffectId = "") const;
2765
2809 std::shared_ptr<Message>
2810 sendMessage(std::variant<std::int64_t, std::string> chatId, const std::string& text,
2811 std::shared_ptr<LinkPreviewOptions> linkPreviewOptions = nullptr,
2812 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2813 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2814 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2815 replyMarkup = { },
2816 const std::string& parseMode = "", bool disableNotification = false,
2817 const std::vector<std::shared_ptr<MessageEntity>>& entities = { }, std::int32_t messageThreadId = 0,
2818 bool protectContent = false, const std::string& businessConnectionId = "",
2819 bool allowPaidBroadcast = false, const std::string& callbackQueryId = "",
2820 std::int64_t directMessagesTopicId = 0, const std::string& messageEffectId = "",
2821 std::int64_t receiverUserId = 0,
2822 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2823
2843 bool sendMessageDraft(std::variant<std::int64_t, std::string> chatId, std::int32_t draftId,
2844 const std::vector<std::shared_ptr<MessageEntity>>& entities = { },
2845 std::int32_t messageThreadId = 0, const std::string& parseMode = "",
2846 const std::string& text = "") const;
2847
2890 std::shared_ptr<Message> sendPaidMedia(
2891 std::variant<std::int64_t, std::string> chatId, const std::vector<std::shared_ptr<InputPaidMedia>>& media,
2892 std::int32_t starCount, bool allowPaidBroadcast = false, const std::string& businessConnectionId = "",
2893 const std::string& caption = "", const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
2894 std::int64_t directMessagesTopicId = 0, bool disableNotification = false, std::int32_t messageThreadId = 0,
2895 const std::string& parseMode = "", const std::string& payload = "", bool protectContent = false,
2896 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2897 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2898 replyMarkup = { },
2899 std::shared_ptr<ReplyParameters> replyParameters = nullptr, bool showCaptionAboveMedia = false,
2900 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2901
2953 std::shared_ptr<Message> sendPhoto(
2954 std::variant<std::int64_t, std::string> chatId, std::variant<std::shared_ptr<InputFile>, std::string> photo,
2955 const std::string& caption = "", std::shared_ptr<ReplyParameters> replyParameters = nullptr,
2956 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
2957 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
2958 replyMarkup = { },
2959 const std::string& parseMode = "", bool disableNotification = false,
2960 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { }, std::int32_t messageThreadId = 0,
2961 bool protectContent = false, bool hasSpoiler = false, const std::string& businessConnectionId = "",
2962 bool allowPaidBroadcast = false, const std::string& callbackQueryId = "",
2963 std::int64_t directMessagesTopicId = 0, const std::string& messageEffectId = "",
2964 std::int64_t receiverUserId = 0, bool showCaptionAboveMedia = false,
2965 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
2966
3040 std::shared_ptr<Message>
3041 sendPoll(std::variant<std::int64_t, std::string> chatId, const std::string& question,
3042 const std::vector<std::shared_ptr<InputPollOption>>& options, bool disableNotification = false,
3043 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
3044 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
3045 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
3046 replyMarkup = { },
3047 bool isAnonymous = true, const std::string& type = "", bool allowsMultipleAnswers = false,
3048 const std::string& explanation = "", const std::string& explanationParseMode = "",
3049 const std::vector<std::shared_ptr<MessageEntity>>& explanationEntities = { }, std::int32_t openPeriod = 0,
3050 std::int32_t closeDate = 0, bool isClosed = false, std::int32_t messageThreadId = 0,
3051 bool protectContent = false, const std::string& businessConnectionId = "", bool allowAddingOptions = false,
3052 bool allowPaidBroadcast = false, bool allowsRevoting = false,
3053 const std::vector<std::int32_t>& correctOptionIds = { },
3054 const std::vector<std::string>& countryCodes = { }, const std::string& description = "",
3055 const std::vector<std::shared_ptr<MessageEntity>>& descriptionEntities = { },
3056 const std::string& descriptionParseMode = "", std::shared_ptr<InputPollMedia> explanationMedia = nullptr,
3057 bool hideResultsUntilCloses = false, std::shared_ptr<InputPollMedia> media = nullptr,
3058 bool membersOnly = false, const std::string& messageEffectId = "",
3059 const std::vector<std::shared_ptr<MessageEntity>>& questionEntities = { },
3060 const std::string& questionParseMode = "", bool shuffleOptions = false) const;
3061
3097 std::shared_ptr<Message>
3098 sendRichMessage(std::variant<std::int64_t, std::string> chatId, std::shared_ptr<InputRichMessage> richMessage,
3099 bool allowPaidBroadcast = false, const std::string& businessConnectionId = "",
3100 std::int64_t directMessagesTopicId = 0, bool disableNotification = false,
3101 const std::string& messageEffectId = "", std::int32_t messageThreadId = 0,
3102 bool protectContent = false,
3103 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
3104 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
3105 replyMarkup = { },
3106 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
3107 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
3108
3124 bool sendRichMessageDraft(std::variant<std::int64_t, std::string> chatId, std::int32_t draftId,
3125 std::shared_ptr<InputRichMessage> richMessage, std::int32_t messageThreadId = 0) const;
3126
3172 std::shared_ptr<Message> sendSticker(
3173 std::variant<std::int64_t, std::string> chatId, std::variant<std::shared_ptr<InputFile>, std::string> sticker,
3174 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
3175 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
3176 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
3177 replyMarkup = { },
3178 bool disableNotification = false, std::int32_t messageThreadId = 0, bool protectContent = false,
3179 const std::string& emoji = "", const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
3180 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
3181 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
3182 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
3183
3232 std::shared_ptr<Message>
3233 sendVenue(std::variant<std::int64_t, std::string> chatId, double latitude, double longitude,
3234 const std::string& title, const std::string& address, const std::string& foursquareId = "",
3235 const std::string& foursquareType = "", bool disableNotification = false,
3236 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
3237 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
3238 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
3239 replyMarkup = { },
3240 const std::string& googlePlaceId = "", const std::string& googlePlaceType = "",
3241 std::int32_t messageThreadId = 0, bool protectContent = false,
3242 const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
3243 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
3244 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
3245 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
3246
3317 std::shared_ptr<Message> sendVideo(
3318 std::variant<std::int64_t, std::string> chatId, std::variant<std::shared_ptr<InputFile>, std::string> video,
3319 bool supportsStreaming = false, std::int32_t duration = 0, std::int32_t width = 0, std::int32_t height = 0,
3320 std::variant<std::shared_ptr<InputFile>, std::string> thumbnail = { }, const std::string& caption = "",
3321 std::shared_ptr<ReplyParameters> replyParameters = nullptr,
3322 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
3323 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
3324 replyMarkup = { },
3325 const std::string& parseMode = "", bool disableNotification = false,
3326 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { }, std::int32_t messageThreadId = 0,
3327 bool protectContent = false, bool hasSpoiler = false, const std::string& businessConnectionId = "",
3328 bool allowPaidBroadcast = false, const std::string& callbackQueryId = "",
3329 std::variant<std::shared_ptr<InputFile>, std::string> cover = { }, std::int64_t directMessagesTopicId = 0,
3330 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0, bool showCaptionAboveMedia = false,
3331 std::int32_t startTimestamp = 0,
3332 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
3333
3386 std::shared_ptr<Message>
3387 sendVideoNote(std::variant<std::int64_t, std::string> chatId,
3388 std::variant<std::shared_ptr<InputFile>, std::string> videoNote,
3389 std::shared_ptr<ReplyParameters> replyParameters = nullptr, bool disableNotification = false,
3390 std::int32_t duration = 0, std::int32_t length = 0,
3391 std::variant<std::shared_ptr<InputFile>, std::string> thumbnail = { },
3392 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
3393 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
3394 replyMarkup = { },
3395 std::int32_t messageThreadId = 0, bool protectContent = false,
3396 const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
3397 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
3398 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
3399 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
3400
3452 std::shared_ptr<Message>
3453 sendVoice(std::variant<std::int64_t, std::string> chatId,
3454 std::variant<std::shared_ptr<InputFile>, std::string> voice, const std::string& caption = "",
3455 std::int32_t duration = 0, std::shared_ptr<ReplyParameters> replyParameters = nullptr,
3456 std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>,
3457 std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply>>
3458 replyMarkup = { },
3459 const std::string& parseMode = "", bool disableNotification = false,
3460 const std::vector<std::shared_ptr<MessageEntity>>& captionEntities = { },
3461 std::int32_t messageThreadId = 0, bool protectContent = false,
3462 const std::string& businessConnectionId = "", bool allowPaidBroadcast = false,
3463 const std::string& callbackQueryId = "", std::int64_t directMessagesTopicId = 0,
3464 const std::string& messageEffectId = "", std::int64_t receiverUserId = 0,
3465 std::shared_ptr<SuggestedPostParameters> suggestedPostParameters = nullptr) const;
3466
3476 bool setBusinessAccountBio(const std::string& businessConnectionId, const std::string& bio = "") const;
3477
3489 bool setBusinessAccountGiftSettings(std::shared_ptr<AcceptedGiftTypes> acceptedGiftTypes,
3490 const std::string& businessConnectionId, bool showGiftButton) const;
3491
3503 bool setBusinessAccountName(const std::string& businessConnectionId, const std::string& firstName,
3504 const std::string& lastName = "") const;
3505
3518 bool setBusinessAccountProfilePhoto(const std::string& businessConnectionId,
3519 std::shared_ptr<InputProfilePhoto> photo, bool isPublic = false) const;
3520
3530 bool setBusinessAccountUsername(const std::string& businessConnectionId, const std::string& username = "") const;
3531
3544 bool setChatAdministratorCustomTitle(std::variant<std::int64_t, std::string> chatId, std::int64_t userId,
3545 const std::string& customTitle) const;
3546
3558 bool setChatDescription(std::variant<std::int64_t, std::string> chatId, const std::string& description = "") const;
3559
3572 bool setChatMemberTag(std::variant<std::int64_t, std::string> chatId, std::int64_t userId,
3573 const std::string& tag = "") const;
3574
3586 bool setChatMenuButton(std::variant<std::int64_t, std::string> chatId = { },
3587 std::shared_ptr<MenuButton> menuButton = nullptr) const;
3588
3606 bool setChatPermissions(std::variant<std::int64_t, std::string> chatId,
3607 std::shared_ptr<ChatPermissions> permissions,
3608 bool useIndependentChatPermissions = false) const;
3609
3621 bool setChatPhoto(std::variant<std::int64_t, std::string> chatId,
3622 std::variant<std::shared_ptr<InputFile>, std::string> photo) const;
3623
3636 bool setChatStickerSet(std::variant<std::int64_t, std::string> chatId, const std::string& stickerSetName) const;
3637
3649 bool setChatTitle(std::variant<std::int64_t, std::string> chatId, const std::string& title) const;
3650
3661 bool setCustomEmojiStickerSetThumbnail(const std::string& name, const std::string& customEmojiId = "") const;
3662
3684 std::shared_ptr<Message> setGameScore(std::int64_t userId, std::int32_t score, bool force = false,
3685 bool disableEditMessage = false,
3686 std::variant<std::int64_t, std::string> chatId = { },
3687 std::int32_t messageId = 0, const std::string& inlineMessageId = "") const;
3688
3701 bool setManagedBotAccessSettings(bool isAccessRestricted, std::int64_t userId,
3702 const std::vector<std::int32_t>& addedUserIds = { }) const;
3703
3724 bool setMessageReaction(std::variant<std::int64_t, std::string> chatId, std::int32_t messageId,
3725 const std::vector<std::shared_ptr<ReactionType>>& reaction = { }, bool isBig = false) const;
3726
3741 bool setMyCommands(const std::vector<std::shared_ptr<BotCommand>>& commands,
3742 std::shared_ptr<BotCommandScope> scope = nullptr, const std::string& languageCode = "") const;
3743
3758 bool setMyDefaultAdministratorRights(std::shared_ptr<ChatAdministratorRights> rights = nullptr,
3759 bool forChannels = false) const;
3760
3773 bool setMyDescription(const std::string& description = "", const std::string& languageCode = "") const;
3774
3785 bool setMyName(const std::string& name = "", const std::string& languageCode = "") const;
3786
3794 bool setMyProfilePhoto(std::shared_ptr<InputProfilePhoto> photo) const;
3795
3809 bool setMyShortDescription(const std::string& shortDescription = "", const std::string& languageCode = "") const;
3810
3825 bool setPassportDataErrors(std::int64_t userId,
3826 const std::vector<std::shared_ptr<PassportElementError>>& errors) const;
3827
3838 bool setStickerEmojiList(const std::string& sticker, const std::vector<std::string>& emojiList) const;
3839
3850 bool setStickerKeywords(const std::string& sticker, const std::vector<std::string>& keywords = { }) const;
3851
3862 bool setStickerMaskPosition(const std::string& sticker, std::shared_ptr<MaskPosition> maskPosition = nullptr) const;
3863
3873 bool setStickerPositionInSet(const std::string& sticker, std::int32_t position) const;
3874
3900 bool setStickerSetThumbnail(const std::string& name, std::int64_t userId, const std::string& format,
3901 std::variant<std::shared_ptr<InputFile>, std::string> thumbnail = { }) const;
3902
3911 bool setStickerSetTitle(const std::string& name, const std::string& title) const;
3912
3925 bool setUserEmojiStatus(std::int64_t userId, const std::string& emojiStatusCustomEmojiId = "",
3926 std::int32_t emojiStatusExpirationDate = 0) const;
3927
3965 bool setWebhook(const std::string& url, std::shared_ptr<InputFile> certificate = nullptr,
3966 std::int32_t maxConnections = 40, const std::vector<std::string>& allowedUpdates = { },
3967 const std::string& ipAddress = "", bool dropPendingUpdates = false,
3968 const std::string& secretToken = "") const;
3969
3988 std::shared_ptr<Message> stopMessageLiveLocation(std::variant<std::int64_t, std::string> chatId = { },
3989 std::int32_t messageId = 0,
3990 const std::string& inlineMessageId = "",
3991 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr,
3992 const std::string& businessConnectionId = "") const;
3993
4007 std::shared_ptr<Poll> stopPoll(std::variant<std::int64_t, std::string> chatId, std::int32_t messageId,
4008 const std::string& businessConnectionId = "",
4009 std::shared_ptr<InlineKeyboardMarkup> replyMarkup = nullptr) const;
4010
4020 bool transferBusinessAccountStars(const std::string& businessConnectionId, std::int32_t starCount) const;
4021
4037 bool transferGift(const std::string& businessConnectionId, std::int64_t newOwnerChatId,
4038 const std::string& ownedGiftId, std::int32_t starCount = 0) const;
4039
4055 bool unbanChatMember(std::variant<std::int64_t, std::string> chatId, std::int64_t userId,
4056 bool onlyIfBanned = false) const;
4057
4069 bool unbanChatSenderChat(std::variant<std::int64_t, std::string> chatId, std::int64_t senderChatId) const;
4070
4081 bool unhideGeneralForumTopic(std::variant<std::int64_t, std::string> chatId) const;
4082
4095 bool unpinAllChatMessages(std::variant<std::int64_t, std::string> chatId) const;
4096
4109 bool unpinAllForumTopicMessages(std::variant<std::int64_t, std::string> chatId, std::int32_t messageThreadId) const;
4110
4121 bool unpinAllGeneralForumTopicMessages(std::variant<std::int64_t, std::string> chatId) const;
4122
4140 bool unpinChatMessage(std::variant<std::int64_t, std::string> chatId, const std::string& businessConnectionId = "",
4141 std::int32_t messageId = 0) const;
4142
4160 bool upgradeGift(const std::string& businessConnectionId, const std::string& ownedGiftId,
4161 bool keepOriginalDetails = false, std::int32_t starCount = 0) const;
4162
4176 std::shared_ptr<File> uploadStickerFile(std::int64_t userId,
4177 std::variant<std::shared_ptr<InputFile>, std::string> sticker,
4178 const std::string& stickerFormat) const;
4179
4193 bool verifyChat(std::variant<std::int64_t, std::string> chatId, const std::string& customDescription = "") const;
4194
4206 bool verifyUser(std::int64_t userId, const std::string& customDescription = "") const;
std::shared_ptr< Message > editMessageText(const std::string &text="", std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &inlineMessageId="", const std::string &parseMode="", std::shared_ptr< LinkPreviewOptions > linkPreviewOptions=nullptr, std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, const std::vector< std::shared_ptr< MessageEntity > > &entities={ }, const std::string &businessConnectionId="", std::shared_ptr< InputRichMessage > richMessage=nullptr) const
Use this method to edit text, rich and game messages. On success, if the edited message is not an inl...
bool approveSuggestedPost(std::variant< std::int64_t, std::string > chatId, std::int32_t messageId, std::int32_t sendDate=0) const
Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_pos...
std::shared_ptr< ChatInviteLink > editChatSubscriptionInviteLink(std::variant< std::int64_t, std::string > chatId, const std::string &inviteLink, const std::string &name="") const
Use this method to edit a subscription invite link created by the bot. The bot must have the can_invi...
bool answerPreCheckoutQuery(const std::string &preCheckoutQueryId, bool ok, const std::string &errorMessage="") const
Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmat...
bool unbanChatMember(std::variant< std::int64_t, std::string > chatId, std::int64_t userId, bool onlyIfBanned=false) const
Use this method to unban a previously banned user in a supergroup or channel. The user will not retur...
bool setUserEmojiStatus(std::int64_t userId, const std::string &emojiStatusCustomEmojiId="", std::int32_t emojiStatusExpirationDate=0) const
Changes the emoji status for a given user that previously allowed the bot to manage their emoji statu...
bool sendChatJoinRequestWebApp(const std::string &chatJoinRequestQueryId, const std::string &webAppUrl) const
Use this method to process a received chat join request query by showing a Mini App to the user befor...
std::shared_ptr< Message > editMessageReplyMarkup(std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &inlineMessageId="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, const std::string &businessConnectionId="") const
Use this method to edit only the reply markup of messages. On success, if the edited message is not a...
bool setStickerMaskPosition(const std::string &sticker, std::shared_ptr< MaskPosition > maskPosition=nullptr) const
Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker s...
bool unpinChatMessage(std::variant< std::int64_t, std::string > chatId, const std::string &businessConnectionId="", std::int32_t messageId=0) const
Use this method to remove a message from the list of pinned messages in a chat. In private chats and ...
std::shared_ptr< Message > sendInvoice(std::variant< std::int64_t, std::string > chatId, const std::string &title, const std::string &description, const std::string &payload, const std::string &providerToken, const std::string &currency, const std::vector< std::shared_ptr< LabeledPrice > > &prices, const std::string &providerData="", const std::string &photoUrl="", std::int32_t photoSize=0, std::int32_t photoWidth=0, std::int32_t photoHeight=0, bool needName=false, bool needPhoneNumber=false, bool needEmail=false, bool needShippingAddress=false, bool sendPhoneNumberToProvider=false, bool sendEmailToProvider=false, bool isFlexible=false, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, bool disableNotification=false, std::int32_t messageThreadId=0, std::int32_t maxTipAmount=0, const std::vector< std::int32_t > &suggestedTipAmounts={ }, const std::string &startParameter="", bool protectContent=false, bool allowPaidBroadcast=false, std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send invoices. On success, the sent Message is returned.
std::shared_ptr< Message > sendVideoNote(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > videoNote, std::shared_ptr< ReplyParameters > replyParameters=nullptr, bool disableNotification=false, std::int32_t duration=0, std::int32_t length=0, std::variant< std::shared_ptr< InputFile >, std::string > thumbnail={ }, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long....
std::string exportChatInviteLink(std::variant< std::int64_t, std::string > chatId) const
Use this method to generate a new primary invite link for a chat; any previously generated primary li...
bool editEphemeralMessageReplyMarkup(std::variant< std::int64_t, std::string > chatId, std::int32_t ephemeralMessageId, std::int64_t receiverUserId, std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr) const
Use this method to edit only the reply markup of an ephemeral message. Note that it is not guaranteed...
bool giftPremiumSubscription(std::int32_t monthCount, std::int32_t starCount, std::int64_t userId, const std::string &text="", const std::vector< std::shared_ptr< MessageEntity > > &textEntities={ }, const std::string &textParseMode="") const
Gifts a Telegram Premium subscription to the given user. Returns True on success.
std::shared_ptr< SentGuestMessage > answerGuestQuery(const std::string &guestQueryId, std::shared_ptr< InlineQueryResult > result) const
Use this method to reply to a received guest message. On success, a SentGuestMessage object is return...
bool editGeneralForumTopic(std::variant< std::int64_t, std::string > chatId, const std::string &name) const
Use this method to edit the name of the 'General' topic in a forum supergroup chat....
bool createNewStickerSet(std::int64_t userId, const std::string &name, const std::string &title, const std::vector< std::shared_ptr< InputSticker > > &stickers, Sticker::Type stickerType=Sticker::Type::Regular, bool needsRepainting=false) const
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker...
bool approveChatJoinRequest(std::variant< std::int64_t, std::string > chatId, std::int64_t userId) const
Use this method to approve a chat join request. The bot must be an administrator in the chat for this...
bool transferGift(const std::string &businessConnectionId, std::int64_t newOwnerChatId, const std::string &ownedGiftId, std::int32_t starCount=0) const
Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business ...
bool deleteEphemeralMessage(std::variant< std::int64_t, std::string > chatId, std::int32_t ephemeralMessageId, std::int64_t receiverUserId) const
Use this method to delete an ephemeral message. Note that it is not guaranteed that the user will rec...
std::shared_ptr< UserChatBoosts > getUserChatBoosts(std::variant< std::int64_t, std::string > chatId, std::int64_t userId) const
Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in...
bool close() const
Use this method to close the bot instance before moving it from one local server to another....
bool editForumTopic(std::variant< std::int64_t, std::string > chatId, std::int32_t messageThreadId, const std::string &name="", const std::string &iconCustomEmojiId="") const
Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a ...
bool editUserStarSubscription(bool isCanceled, const std::string &telegramPaymentChargeId, std::int64_t userId) const
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars....
bool verifyUser(std::int64_t userId, const std::string &customDescription="") const
Verifies a user on behalf of the organization which is represented by the bot. Returns True on succes...
std::shared_ptr< Message > sendPhoto(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > photo, const std::string &caption="", std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &parseMode="", bool disableNotification=false, const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, std::int32_t messageThreadId=0, bool protectContent=false, bool hasSpoiler=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, bool showCaptionAboveMedia=false, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send photos. On success, the sent Message is returned.
std::shared_ptr< Message > sendVoice(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > voice, const std::string &caption="", std::int32_t duration=0, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &parseMode="", bool disableNotification=false, const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send audio files, if you want Telegram clients to display the file as a playable v...
std::string replaceManagedBotToken(std::int64_t userId) const
Use this method to revoke the current token of a managed bot and generate a new one....
bool unpinAllChatMessages(std::variant< std::int64_t, std::string > chatId) const
Use this method to clear the list of pinned messages in a chat. In private chats and channel direct m...
std::shared_ptr< Message > editMessageMedia(std::shared_ptr< InputMedia > media, std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &inlineMessageId="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, const std::string &businessConnectionId="") const
Use this method to edit animation, audio, document, live photo, photo, or video messages,...
bool closeForumTopic(std::variant< std::int64_t, std::string > chatId, std::int32_t messageThreadId) const
Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator i...
bool deleteStickerSet(const std::string &name) const
Use this method to delete a sticker set that was created by the bot. Returns True on success....
bool banChatSenderChat(std::variant< std::int64_t, std::string > chatId, std::int64_t senderChatId) const
Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned,...
std::shared_ptr< StickerSet > getStickerSet(const std::string &name) const
Use this method to get a sticker set. On success, a StickerSet object is returned.
std::shared_ptr< ChatInviteLink > createChatSubscriptionInviteLink(std::variant< std::int64_t, std::string > chatId, std::int32_t subscriptionPeriod, std::int32_t subscriptionPrice, const std::string &name="") const
Use this method to create a subscription invite link for a channel chat. The bot must have the can_in...
std::shared_ptr< BotDescription > getMyDescription(const std::string &languageCode="") const
Use this method to get the current bot description for the given user language. Returns BotDescriptio...
std::shared_ptr< Message > sendPoll(std::variant< std::int64_t, std::string > chatId, const std::string &question, const std::vector< std::shared_ptr< InputPollOption > > &options, bool disableNotification=false, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, bool isAnonymous=true, const std::string &type="", bool allowsMultipleAnswers=false, const std::string &explanation="", const std::string &explanationParseMode="", const std::vector< std::shared_ptr< MessageEntity > > &explanationEntities={ }, std::int32_t openPeriod=0, std::int32_t closeDate=0, bool isClosed=false, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowAddingOptions=false, bool allowPaidBroadcast=false, bool allowsRevoting=false, const std::vector< std::int32_t > &correctOptionIds={ }, const std::vector< std::string > &countryCodes={ }, const std::string &description="", const std::vector< std::shared_ptr< MessageEntity > > &descriptionEntities={ }, const std::string &descriptionParseMode="", std::shared_ptr< InputPollMedia > explanationMedia=nullptr, bool hideResultsUntilCloses=false, std::shared_ptr< InputPollMedia > media=nullptr, bool membersOnly=false, const std::string &messageEffectId="", const std::vector< std::shared_ptr< MessageEntity > > &questionEntities={ }, const std::string &questionParseMode="", bool shuffleOptions=false) const
Use this method to send a native poll. On success, the sent Message is returned.
bool deleteMessages(std::variant< std::int64_t, std::string > chatId, const std::vector< std::int32_t > &messageIds) const
Use this method to delete multiple messages simultaneously. If some of the specified messages can't b...
std::string getManagedBotToken(std::int64_t userId) const
Use this method to get the token of a managed bot. Returns the token as String on success.
bool hideGeneralForumTopic(std::variant< std::int64_t, std::string > chatId) const
Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administra...
std::shared_ptr< Message > editMessageCaption(std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &caption="", const std::string &inlineMessageId="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, const std::string &parseMode="", const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, const std::string &businessConnectionId="", bool showCaptionAboveMedia=false) const
Use this method to edit captions of messages. On success, if the edited message is not an inline mess...
bool restrictChatMember(std::variant< std::int64_t, std::string > chatId, std::int64_t userId, std::shared_ptr< ChatPermissions > permissions, std::int32_t untilDate=0, bool useIndependentChatPermissions=false) const
Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergrou...
std::shared_ptr< ChatMember > getChatMember(std::variant< std::int64_t, std::string > chatId, std::int64_t userId) const
Use this method to get information about a member of a chat. The method is only guaranteed to work fo...
std::shared_ptr< OwnedGifts > getChatGifts(std::variant< std::int64_t, std::string > chatId, bool excludeFromBlockchain=false, bool excludeLimitedNonUpgradable=false, bool excludeLimitedUpgradable=false, bool excludeSaved=false, bool excludeUnique=false, bool excludeUnlimited=false, bool excludeUnsaved=false, std::int32_t limit=0, const std::string &offset="", bool sortByPrice=false) const
Returns the gifts owned by a chat. Returns OwnedGifts on success.
std::shared_ptr< Message > sendRichMessage(std::variant< std::int64_t, std::string > chatId, std::shared_ptr< InputRichMessage > richMessage, bool allowPaidBroadcast=false, const std::string &businessConnectionId="", std::int64_t directMessagesTopicId=0, bool disableNotification=false, const std::string &messageEffectId="", std::int32_t messageThreadId=0, bool protectContent=false, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send rich messages. If the message contains a block with a media element,...
std::vector< std::shared_ptr< Message > > sendMediaGroup(std::variant< std::int64_t, std::string > chatId, const std::vector< std::variant< std::shared_ptr< InputMediaAudio >, std::shared_ptr< InputMediaDocument >, std::shared_ptr< InputMediaLivePhoto >, std::shared_ptr< InputMediaPhoto >, std::shared_ptr< InputMediaVideo > > > &media, bool disableNotification=false, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="") const
Use this method to send a group of photos, live photos, videos, documents or audios as an album....
std::shared_ptr< Message > sendMessage(std::variant< std::int64_t, std::string > chatId, const std::string &text, std::shared_ptr< LinkPreviewOptions > linkPreviewOptions=nullptr, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &parseMode="", bool disableNotification=false, const std::vector< std::shared_ptr< MessageEntity > > &entities={ }, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send text messages. On success, the sent Message is returned.
std::shared_ptr< PreparedInlineMessage > savePreparedInlineMessage(std::shared_ptr< InlineQueryResult > result, std::int64_t userId, bool allowBotChats=false, bool allowChannelChats=false, bool allowGroupChats=false, bool allowUserChats=false) const
Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
std::vector< std::shared_ptr< Update > > getUpdates(std::int32_t offset=0, std::int32_t limit=100, std::int32_t timeout=0, const std::vector< std::string > &allowedUpdates={ }) const
Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update obj...
std::shared_ptr< Message > sendAnimation(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > animation, std::int32_t duration=0, std::int32_t width=0, std::int32_t height=0, std::variant< std::shared_ptr< InputFile >, std::string > thumbnail={ }, const std::string &caption="", std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &parseMode="", bool disableNotification=false, const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, std::int32_t messageThreadId=0, bool protectContent=false, bool hasSpoiler=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, bool showCaptionAboveMedia=false, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound)....
std::shared_ptr< UserProfilePhotos > getUserProfilePhotos(std::int64_t userId, std::int32_t offset=0, std::int32_t limit=100) const
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
bool setBusinessAccountUsername(const std::string &businessConnectionId, const std::string &username="") const
Changes the username of a managed business account. Requires the can_change_username business bot rig...
bool removeBusinessAccountProfilePhoto(const std::string &businessConnectionId, bool isPublic=false) const
Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo ...
bool addStickerToSet(std::int64_t userId, const std::string &name, std::shared_ptr< InputSticker > sticker) const
Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 2...
std::vector< std::shared_ptr< MessageId > > copyMessages(std::variant< std::int64_t, std::string > chatId, std::variant< std::int64_t, std::string > fromChatId, const std::vector< std::int32_t > &messageIds, std::int32_t messageThreadId=0, bool disableNotification=false, bool protectContent=false, bool removeCaption=false, std::int64_t directMessagesTopicId=0) const
Use this method to copy messages of any kind. If some of the specified messages can't be found or cop...
bool declineChatJoinRequest(std::variant< std::int64_t, std::string > chatId, std::int64_t userId) const
Use this method to decline a chat join request. The bot must be an administrator in the chat for this...
bool setMyDescription(const std::string &description="", const std::string &languageCode="") const
Use this method to change the bot's description, which is shown in the chat with the bot if the chat ...
bool refundStarPayment(const std::string &telegramPaymentChargeId, std::int64_t userId) const
Refunds a successful payment in Telegram Stars. Returns True on success.
bool logOut() const
Use this method to log out from the cloud Bot API server before launching the bot locally....
std::shared_ptr< Message > editMessageChecklist(std::variant< std::int64_t, std::string > chatId, const std::string &businessConnectionId, std::shared_ptr< InputChecklist > checklist, std::int32_t messageId, std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr) const
Use this method to edit a checklist on behalf of a connected business account. On success,...
std::shared_ptr< Message > sendLocation(std::variant< std::int64_t, std::string > chatId, double latitude, double longitude, std::int32_t livePeriod=0, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, bool disableNotification=false, double horizontalAccuracy=0, std::int32_t heading=0, std::int32_t proximityAlertRadius=0, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send point on the map. On success, the sent Message is returned.
std::shared_ptr< WebhookInfo > getWebhookInfo() const
Use this method to get current webhook status. Requires no parameters. On success,...
bool setMyCommands(const std::vector< std::shared_ptr< BotCommand > > &commands, std::shared_ptr< BotCommandScope > scope=nullptr, const std::string &languageCode="") const
Use this method to change the list of the bot's commands. See this manual for more details about bot ...
bool deleteMessage(std::variant< std::int64_t, std::string > chatId, std::int32_t messageId) const
Use this method to delete a message, including service messages, with the following limitations:- A m...
bool setWebhook(const std::string &url, std::shared_ptr< InputFile > certificate=nullptr, std::int32_t maxConnections=40, const std::vector< std::string > &allowedUpdates={ }, const std::string &ipAddress="", bool dropPendingUpdates=false, const std::string &secretToken="") const
Use this method to specify a URL and receive incoming updates via an outgoing webhook....
bool setMyProfilePhoto(std::shared_ptr< InputProfilePhoto > photo) const
Changes the profile photo of the bot. Returns True on success.
std::shared_ptr< Story > postStory(std::int32_t activePeriod, const std::string &businessConnectionId, std::shared_ptr< InputStoryContent > content, const std::vector< std::shared_ptr< StoryArea > > &areas={ }, const std::string &caption="", const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, const std::string &parseMode="", bool postToChatPage=false, bool protectContent=false) const
Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot r...
std::vector< std::shared_ptr< MessageId > > forwardMessages(std::variant< std::int64_t, std::string > chatId, std::variant< std::int64_t, std::string > fromChatId, const std::vector< std::int32_t > &messageIds, std::int32_t messageThreadId=0, bool disableNotification=false, bool protectContent=false, std::int64_t directMessagesTopicId=0) const
Use this method to forward multiple messages of any kind. If some of the specified messages can't be ...
bool leaveChat(std::variant< std::int64_t, std::string > chatId) const
Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
bool unbanChatSenderChat(std::variant< std::int64_t, std::string > chatId, std::int64_t senderChatId) const
Use this method to unban a previously banned channel chat in a supergroup or channel....
std::shared_ptr< Message > sendDice(std::variant< std::int64_t, std::string > chatId, bool disableNotification=false, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &emoji="", std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send an animated emoji that will display a random value. On success,...
std::shared_ptr< Message > sendContact(std::variant< std::int64_t, std::string > chatId, const std::string &phoneNumber, const std::string &firstName, const std::string &lastName="", const std::string &vcard="", bool disableNotification=false, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send phone contacts. On success, the sent Message is returned.
bool editEphemeralMessageMedia(std::variant< std::int64_t, std::string > chatId, std::int32_t ephemeralMessageId, std::shared_ptr< InputMedia > media, std::int64_t receiverUserId, std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr) const
Use this method to edit the media of an ephemeral message. Note that it is not guaranteed that the us...
bool setChatMenuButton(std::variant< std::int64_t, std::string > chatId={ }, std::shared_ptr< MenuButton > menuButton=nullptr) const
Use this method to change the bot's menu button in a private chat, or the default menu button....
bool deleteMessageReaction(std::variant< std::int64_t, std::string > chatId, std::int32_t messageId, std::int64_t actorChatId=0, std::int64_t userId=0) const
Use this method to remove a reaction from a message in a group or a supergroup chat....
std::shared_ptr< SentWebAppMessage > answerWebAppQuery(const std::string &webAppQueryId, std::shared_ptr< InlineQueryResult > result) const
Use this method to set the result of an interaction with a Web App and send a corresponding message o...
std::vector< std::shared_ptr< GameHighScore > > getGameHighScores(std::int64_t userId, std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &inlineMessageId="") const
Use this method to get data for high score tables. Will return the score of the specified user and se...
bool pinChatMessage(std::variant< std::int64_t, std::string > chatId, std::int32_t messageId, const std::string &businessConnectionId="", bool disableNotification=false) const
Use this method to add a message to the list of pinned messages in a chat. In private chats and chann...
bool unpinAllForumTopicMessages(std::variant< std::int64_t, std::string > chatId, std::int32_t messageThreadId) const
Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a...
std::shared_ptr< StarTransactions > getStarTransactions(std::int32_t limit=0, std::int32_t offset=0) const
Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransa...
bool upgradeGift(const std::string &businessConnectionId, const std::string &ownedGiftId, bool keepOriginalDetails=false, std::int32_t starCount=0) const
Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business ...
bool verifyChat(std::variant< std::int64_t, std::string > chatId, const std::string &customDescription="") const
Verifies a chat on behalf of the organization which is represented by the bot. Returns True on succes...
std::shared_ptr< Message > sendSticker(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > sticker, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, bool disableNotification=false, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &emoji="", const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success,...
bool editEphemeralMessageCaption(std::variant< std::int64_t, std::string > chatId, std::int32_t ephemeralMessageId, std::int64_t receiverUserId, const std::string &caption="", const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, const std::string &parseMode="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr) const
Use this method to edit the caption of an ephemeral message. Note that it is not guaranteed that the ...
bool deleteWebhook(bool dropPendingUpdates=false) const
Use this method to remove webhook integration if you decide to switch back to getUpdates....
bool setChatDescription(std::variant< std::int64_t, std::string > chatId, const std::string &description="") const
Use this method to change the description of a group, a supergroup or a channel. The bot must be an a...
bool deleteBusinessMessages(const std::string &businessConnectionId, const std::vector< std::int32_t > &messageIds) const
Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot r...
bool removeMyProfilePhoto() const
Removes the profile photo of the bot. Requires no parameters. Returns True on success.
std::shared_ptr< BusinessConnection > getBusinessConnection(const std::string &businessConnectionId) const
Use this method to get information about the connection of the bot with a business account....
bool setStickerKeywords(const std::string &sticker, const std::vector< std::string > &keywords={ }) const
Use this method to change search keywords assigned to a regular or custom emoji sticker....
bool setCustomEmojiStickerSetThumbnail(const std::string &name, const std::string &customEmojiId="") const
Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.
std::string createInvoiceLink(const std::string &title, const std::string &description, const std::string &payload, const std::string &providerToken, const std::string &currency, const std::vector< std::shared_ptr< LabeledPrice > > &prices, std::int32_t maxTipAmount=0, const std::vector< std::int32_t > &suggestedTipAmounts={ }, const std::string &providerData="", const std::string &photoUrl="", std::int32_t photoSize=0, std::int32_t photoWidth=0, std::int32_t photoHeight=0, bool needName=false, bool needPhoneNumber=false, bool needEmail=false, bool needShippingAddress=false, bool sendPhoneNumberToProvider=false, bool sendEmailToProvider=false, bool isFlexible=false, const std::string &businessConnectionId="", std::int32_t subscriptionPeriod=0) const
Use this method to create a link for an invoice. Returns the created invoice link as String on succes...
bool setPassportDataErrors(std::int64_t userId, const std::vector< std::shared_ptr< PassportElementError > > &errors) const
Informs a user that some of the Telegram Passport elements they provided contains errors....
std::shared_ptr< ChatInviteLink > revokeChatInviteLink(std::variant< std::int64_t, std::string > chatId, const std::string &inviteLink) const
Use this method to revoke an invite link created by the bot. If the primary link is revoked,...
std::shared_ptr< StarAmount > getMyStarBalance() const
A method to get the current Telegram Stars balance of the bot. Requires no parameters....
std::int32_t getChatMemberCount(std::variant< std::int64_t, std::string > chatId) const
Use this method to get the number of members in a chat. Returns Integer on success.
std::vector< std::shared_ptr< ChatMember > > getChatAdministrators(std::variant< std::int64_t, std::string > chatId, bool returnBots=false) const
Use this method to get a list of administrators in a chat. Returns an Array of ChatMember objects.
std::shared_ptr< File > getFile(const std::string &fileId) const
Use this method to get basic information about a file and prepare it for downloading....
std::shared_ptr< MessageId > copyMessage(std::variant< std::int64_t, std::string > chatId, std::variant< std::int64_t, std::string > fromChatId, std::int32_t messageId, const std::string &caption="", const std::string &parseMode="", const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, bool disableNotification=false, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, bool protectContent=false, std::int32_t messageThreadId=0, bool allowPaidBroadcast=false, std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", bool showCaptionAboveMedia=false, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr, std::int32_t videoStartTimestamp=0) const
Use this method to copy messages of any kind. Service messages, paid media messages,...
std::shared_ptr< Message > setGameScore(std::int64_t userId, std::int32_t score, bool force=false, bool disableEditMessage=false, std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &inlineMessageId="") const
Use this method to set the score of the specified user in a game message. On success,...
std::shared_ptr< Poll > stopPoll(std::variant< std::int64_t, std::string > chatId, std::int32_t messageId, const std::string &businessConnectionId="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr) const
Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
bool setChatStickerSet(std::variant< std::int64_t, std::string > chatId, const std::string &stickerSetName) const
Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in ...
bool setStickerSetThumbnail(const std::string &name, std::int64_t userId, const std::string &format, std::variant< std::shared_ptr< InputFile >, std::string > thumbnail={ }) const
Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail fi...
std::shared_ptr< Message > sendGame(std::variant< std::int64_t, std::string > chatId, const std::string &gameShortName, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, bool disableNotification=false, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &messageEffectId="") const
Use this method to send a game. On success, the sent Message is returned.
std::shared_ptr< ForumTopic > createForumTopic(std::variant< std::int64_t, std::string > chatId, const std::string &name, std::int32_t iconColor=0, const std::string &iconCustomEmojiId="") const
Use this method to create a topic in a forum supergroup chat or a private chat with a user....
std::shared_ptr< Gifts > getAvailableGifts() const
Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no paramet...
bool answerShippingQuery(const std::string &shippingQueryId, bool ok, const std::vector< std::shared_ptr< ShippingOption > > &shippingOptions={ }, const std::string &errorMessage="") const
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified,...
bool promoteChatMember(std::variant< std::int64_t, std::string > chatId, std::int64_t userId, bool canChangeInfo=false, bool canPostMessages=false, bool canEditMessages=false, bool canDeleteMessages=false, bool canInviteUsers=false, bool canPinMessages=false, bool canPromoteMembers=false, bool isAnonymous=false, bool canManageChat=false, bool canManageVideoChats=false, bool canRestrictMembers=false, bool canManageTopics=false, bool canPostStories=false, bool canEditStories=false, bool canDeleteStories=false, bool canManageDirectMessages=false, bool canManageTags=false) const
Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administ...
std::shared_ptr< MenuButton > getChatMenuButton(std::variant< std::int64_t, std::string > chatId={ }) const
Use this method to get the current value of the bot's menu button in a private chat,...
bool setStickerPositionInSet(const std::string &sticker, std::int32_t position) const
Use this method to move a sticker in a set created by the bot to a specific position....
std::shared_ptr< PreparedKeyboardButton > savePreparedKeyboardButton(std::shared_ptr< KeyboardButton > button, std::int64_t userId) const
Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButt...
std::vector< std::shared_ptr< BotCommand > > getMyCommands(std::shared_ptr< BotCommandScope > scope=nullptr, const std::string &languageCode="") const
Use this method to get the current list of the bot's commands for the given scope and user language....
bool convertGiftToStars(const std::string &businessConnectionId, const std::string &ownedGiftId) const
Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot...
bool answerCallbackQuery(const std::string &callbackQueryId, const std::string &text="", bool showAlert=false, const std::string &url="", std::int32_t cacheTime=0) const
Use this method to send answers to callback queries sent from inline keyboards. The answer will be di...
bool transferBusinessAccountStars(const std::string &businessConnectionId, std::int32_t starCount) const
Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_tra...
bool setBusinessAccountBio(const std::string &businessConnectionId, const std::string &bio="") const
Changes the bio of a managed business account. Requires the can_change_bio business bot right....
bool setChatPhoto(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > photo) const
Use this method to set a new profile photo for the chat. Photos can't be changed for private chats....
bool deleteForumTopic(std::variant< std::int64_t, std::string > chatId, std::int32_t messageThreadId) const
Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a p...
bool replaceStickerInSet(std::int64_t userId, const std::string &name, const std::string &oldSticker, std::shared_ptr< InputSticker > sticker) const
Use this method to replace an existing sticker in a sticker set with a new one. The method is equival...
bool unhideGeneralForumTopic(std::variant< std::int64_t, std::string > chatId) const
Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administ...
std::shared_ptr< BotShortDescription > getMyShortDescription(const std::string &languageCode="") const
Use this method to get the current bot short description for the given user language....
bool setBusinessAccountGiftSettings(std::shared_ptr< AcceptedGiftTypes > acceptedGiftTypes, const std::string &businessConnectionId, bool showGiftButton) const
Changes the privacy settings pertaining to incoming gifts in a managed business account....
bool setManagedBotAccessSettings(bool isAccessRestricted, std::int64_t userId, const std::vector< std::int32_t > &addedUserIds={ }) const
Use this method to change the access settings of a managed bot. Returns True on success.
bool setMessageReaction(std::variant< std::int64_t, std::string > chatId, std::int32_t messageId, const std::vector< std::shared_ptr< ReactionType > > &reaction={ }, bool isBig=false) const
Use this method to change the chosen reactions on a message. Service messages of some types can't be ...
bool banChatMember(std::variant< std::int64_t, std::string > chatId, std::int64_t userId, std::int32_t untilDate=0, bool revokeMessages=true) const
Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and c...
std::shared_ptr< Message > sendChecklist(std::variant< std::int64_t, std::string > chatId, const std::string &businessConnectionId, std::shared_ptr< InputChecklist > checklist, bool disableNotification=false, const std::string &messageEffectId="", bool protectContent=false, std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, std::shared_ptr< ReplyParameters > replyParameters=nullptr) const
Use this method to send a checklist on behalf of a connected business account. On success,...
std::shared_ptr< Message > editMessageLiveLocation(double latitude, double longitude, std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &inlineMessageId="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, double horizontalAccuracy=0, std::int32_t heading=0, std::int32_t proximityAlertRadius=0, const std::string &businessConnectionId="", std::int32_t livePeriod=0) const
Use this method to edit live location messages. A location can be edited until its live_period expire...
bool setBusinessAccountProfilePhoto(const std::string &businessConnectionId, std::shared_ptr< InputProfilePhoto > photo, bool isPublic=false) const
Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business...
bool setMyName(const std::string &name="", const std::string &languageCode="") const
Use this method to change the bot's name. Returns True on success.
std::shared_ptr< Message > stopMessageLiveLocation(std::variant< std::int64_t, std::string > chatId={ }, std::int32_t messageId=0, const std::string &inlineMessageId="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr, const std::string &businessConnectionId="") const
Use this method to stop updating a live location message before live_period expires....
bool setChatPermissions(std::variant< std::int64_t, std::string > chatId, std::shared_ptr< ChatPermissions > permissions, bool useIndependentChatPermissions=false) const
Use this method to set default chat permissions for all members. The bot must be an administrator in ...
std::vector< std::shared_ptr< Message > > getUserPersonalChatMessages(std::int32_t limit, std::int64_t userId) const
Use this method to get the last messages from the personal chat (i.e., the chat currently added to th...
std::shared_ptr< ChatInviteLink > createChatInviteLink(std::variant< std::int64_t, std::string > chatId, std::int32_t expireDate=0, std::int32_t memberLimit=0, const std::string &name="", bool createsJoinRequest=false) const
Use this method to create an additional invite link for a chat. The bot must be an administrator in t...
std::shared_ptr< Message > sendPaidMedia(std::variant< std::int64_t, std::string > chatId, const std::vector< std::shared_ptr< InputPaidMedia > > &media, std::int32_t starCount, bool allowPaidBroadcast=false, const std::string &businessConnectionId="", const std::string &caption="", const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, std::int64_t directMessagesTopicId=0, bool disableNotification=false, std::int32_t messageThreadId=0, const std::string &parseMode="", const std::string &payload="", bool protectContent=false, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, std::shared_ptr< ReplyParameters > replyParameters=nullptr, bool showCaptionAboveMedia=false, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send paid media. On success, the sent Message is returned.
bool deleteChatStickerSet(std::variant< std::int64_t, std::string > chatId) const
Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in ...
std::shared_ptr< Story > repostStory(std::int32_t activePeriod, const std::string &businessConnectionId, std::variant< std::int64_t, std::string > fromChatId, std::int32_t fromStoryId, bool postToChatPage=false, bool protectContent=false) const
Reposts a story on behalf of a business account from another business account. Both business accounts...
bool setStickerSetTitle(const std::string &name, const std::string &title) const
Use this method to set the title of a created sticker set. Returns True on success.
std::shared_ptr< ChatFullInfo > getChat(std::variant< std::int64_t, std::string > chatId) const
Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on succes...
std::shared_ptr< StarAmount > getBusinessAccountStarBalance(const std::string &businessConnectionId) const
Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts...
bool setMyShortDescription(const std::string &shortDescription="", const std::string &languageCode="") const
Use this method to change the bot's short description, which is shown on the bot's profile page and i...
std::shared_ptr< OwnedGifts > getBusinessAccountGifts(const std::string &businessConnectionId, bool excludeFromBlockchain=false, bool excludeLimitedNonUpgradable=false, bool excludeLimitedUpgradable=false, bool excludeSaved=false, bool excludeUnique=false, bool excludeUnlimited=false, bool excludeUnsaved=false, std::int32_t limit=0, const std::string &offset="", bool sortByPrice=false) const
Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_s...
bool deleteStickerFromSet(const std::string &sticker) const
Use this method to delete a sticker from a set created by the bot. Returns True on success.
bool closeGeneralForumTopic(std::variant< std::int64_t, std::string > chatId) const
Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an admin...
std::shared_ptr< Message > forwardMessage(std::variant< std::int64_t, std::string > chatId, std::variant< std::int64_t, std::string > fromChatId, std::int32_t messageId, bool disableNotification=false, bool protectContent=false, std::int32_t messageThreadId=0, std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr, std::int32_t videoStartTimestamp=0) const
Use this method to forward messages of any kind. Service messages and messages with protected content...
bool deleteStory(const std::string &businessConnectionId, std::int32_t storyId) const
Deletes a story previously posted by the bot on behalf of a managed business account....
std::shared_ptr< Story > editStory(const std::string &businessConnectionId, std::shared_ptr< InputStoryContent > content, std::int32_t storyId, const std::vector< std::shared_ptr< StoryArea > > &areas={ }, const std::string &caption="", const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, const std::string &parseMode="") const
Edits a story previously posted by the bot on behalf of a managed business account....
bool removeUserVerification(std::int64_t userId) const
Removes verification from a user who is currently verified on behalf of the organization represented ...
bool declineSuggestedPost(std::variant< std::int64_t, std::string > chatId, std::int32_t messageId, const std::string &comment="") const
Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_man...
std::shared_ptr< OwnedGifts > getUserGifts(std::int64_t userId, bool excludeFromBlockchain=false, bool excludeLimitedNonUpgradable=false, bool excludeLimitedUpgradable=false, bool excludeUnique=false, bool excludeUnlimited=false, std::int32_t limit=0, const std::string &offset="", bool sortByPrice=false) const
Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.
std::shared_ptr< File > uploadStickerFile(std::int64_t userId, std::variant< std::shared_ptr< InputFile >, std::string > sticker, const std::string &stickerFormat) const
Use this method to upload a file with a sticker for later use in the createNewStickerSet,...
bool setStickerEmojiList(const std::string &sticker, const std::vector< std::string > &emojiList) const
Use this method to change the list of emoji assigned to a regular or custom emoji sticker....
bool setChatMemberTag(std::variant< std::int64_t, std::string > chatId, std::int64_t userId, const std::string &tag="") const
Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an admi...
bool deleteAllMessageReactions(std::variant< std::int64_t, std::string > chatId, std::int64_t actorChatId=0, std::int64_t userId=0) const
Use this method to remove up to 10000 recent reactions in a group or a supergroup chat added by a giv...
std::shared_ptr< Message > sendVideo(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > video, bool supportsStreaming=false, std::int32_t duration=0, std::int32_t width=0, std::int32_t height=0, std::variant< std::shared_ptr< InputFile >, std::string > thumbnail={ }, const std::string &caption="", std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &parseMode="", bool disableNotification=false, const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, std::int32_t messageThreadId=0, bool protectContent=false, bool hasSpoiler=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::variant< std::shared_ptr< InputFile >, std::string > cover={ }, std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, bool showCaptionAboveMedia=false, std::int32_t startTimestamp=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent...
std::shared_ptr< UserProfileAudios > getUserProfileAudios(std::int64_t userId, std::int32_t limit=0, std::int32_t offset=0) const
Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.
std::shared_ptr< Message > sendDocument(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > document, std::variant< std::shared_ptr< InputFile >, std::string > thumbnail={ }, const std::string &caption="", std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &parseMode="", bool disableNotification=false, const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, bool disableContentTypeDetection=false, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send general files. On success, the sent Message is returned. Bots can currently s...
std::shared_ptr< ChatInviteLink > editChatInviteLink(std::variant< std::int64_t, std::string > chatId, const std::string &inviteLink, std::int32_t expireDate=0, std::int32_t memberLimit=0, const std::string &name="", bool createsJoinRequest=false) const
Use this method to edit a non-primary invite link created by the bot. The bot must be an administrato...
std::shared_ptr< Message > sendLivePhoto(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > livePhoto, std::variant< std::shared_ptr< InputFile >, std::string > photo, bool allowPaidBroadcast=false, const std::string &businessConnectionId="", const std::string &callbackQueryId="", const std::string &caption="", const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, std::int64_t directMessagesTopicId=0, bool disableNotification=false, bool hasSpoiler=false, const std::string &messageEffectId="", std::int32_t messageThreadId=0, const std::string &parseMode="", bool protectContent=false, std::int64_t receiverUserId=0, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, std::shared_ptr< ReplyParameters > replyParameters=nullptr, bool showCaptionAboveMedia=false, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send live photos. On success, the sent Message is returned.
std::shared_ptr< ChatAdministratorRights > getMyDefaultAdministratorRights(bool forChannels=false) const
Use this method to get the current default administrator rights of the bot. Returns ChatAdministrator...
bool unpinAllGeneralForumTopicMessages(std::variant< std::int64_t, std::string > chatId) const
Use this method to clear the list of pinned messages in a General forum topic. The bot must be an adm...
bool sendChatAction(std::variant< std::int64_t, std::string > chatId, const std::string &action, std::int32_t messageThreadId=0, const std::string &businessConnectionId="") const
Use this method when you need to tell the user that something is happening on the bot's side....
std::shared_ptr< BotAccessSettings > getManagedBotAccessSettings(std::int64_t userId) const
Use this method to get the access settings of a managed bot. Returns a BotAccessSettings object on su...
std::vector< std::shared_ptr< Sticker > > getForumTopicIconStickers() const
Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user....
bool readBusinessMessage(std::variant< std::int64_t, std::string > chatId, const std::string &businessConnectionId, std::int32_t messageId) const
Marks incoming message as read on behalf of a business account. Requires the can_read_messages busine...
std::vector< std::shared_ptr< Sticker > > getCustomEmojiStickers(const std::vector< std::string > &customEmojiIds) const
Use this method to get information about custom emoji stickers by their identifiers....
bool deleteMyCommands(std::shared_ptr< BotCommandScope > scope=nullptr, const std::string &languageCode="") const
Use this method to delete the list of the bot's commands for the given scope and user language....
bool editEphemeralMessageText(std::variant< std::int64_t, std::string > chatId, std::int32_t ephemeralMessageId, std::int64_t receiverUserId, const std::string &text, const std::vector< std::shared_ptr< MessageEntity > > &entities={ }, std::shared_ptr< LinkPreviewOptions > linkPreviewOptions=nullptr, const std::string &parseMode="", std::shared_ptr< InlineKeyboardMarkup > replyMarkup=nullptr) const
Use this method to edit an ephemeral text message. Note that it is not guaranteed that the user will ...
bool setChatAdministratorCustomTitle(std::variant< std::int64_t, std::string > chatId, std::int64_t userId, const std::string &customTitle) const
Use this method to set a custom title for an administrator in a supergroup promoted by the bot....
bool answerChatJoinRequestQuery(const std::string &chatJoinRequestQueryId, const std::string &result) const
Use this method to process a received chat join request query. Returns True on success.
bool sendGift(const std::string &giftId, std::variant< std::int64_t, std::string > chatId={ }, bool payForUpgrade=false, const std::string &text="", const std::vector< std::shared_ptr< MessageEntity > > &textEntities={ }, const std::string &textParseMode="", std::int64_t userId=0) const
Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the ...
bool setBusinessAccountName(const std::string &businessConnectionId, const std::string &firstName, const std::string &lastName="") const
Changes the first and last name of a managed business account. Requires the can_change_name business ...
std::shared_ptr< Message > sendVenue(std::variant< std::int64_t, std::string > chatId, double latitude, double longitude, const std::string &title, const std::string &address, const std::string &foursquareId="", const std::string &foursquareType="", bool disableNotification=false, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &googlePlaceId="", const std::string &googlePlaceType="", std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send information about a venue. On success, the sent Message is returned.
bool reopenGeneralForumTopic(std::variant< std::int64_t, std::string > chatId) const
Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an adm...
bool answerInlineQuery(const std::string &inlineQueryId, const std::vector< std::shared_ptr< InlineQueryResult > > &results, std::int32_t cacheTime=300, bool isPersonal=false, const std::string &nextOffset="", std::shared_ptr< InlineQueryResultsButton > button=nullptr) const
Use this method to send answers to an inline query. On success, True is returned.No more than 50 resu...
bool sendMessageDraft(std::variant< std::int64_t, std::string > chatId, std::int32_t draftId, const std::vector< std::shared_ptr< MessageEntity > > &entities={ }, std::int32_t messageThreadId=0, const std::string &parseMode="", const std::string &text="") const
Use this method to stream a partial message to a user while the message is being generated....
std::shared_ptr< Message > sendAudio(std::variant< std::int64_t, std::string > chatId, std::variant< std::shared_ptr< InputFile >, std::string > audio, const std::string &caption="", std::int32_t duration=0, const std::string &performer="", const std::string &title="", std::variant< std::shared_ptr< InputFile >, std::string > thumbnail={ }, std::shared_ptr< ReplyParameters > replyParameters=nullptr, std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup={ }, const std::string &parseMode="", bool disableNotification=false, const std::vector< std::shared_ptr< MessageEntity > > &captionEntities={ }, std::int32_t messageThreadId=0, bool protectContent=false, const std::string &businessConnectionId="", bool allowPaidBroadcast=false, const std::string &callbackQueryId="", std::int64_t directMessagesTopicId=0, const std::string &messageEffectId="", std::int64_t receiverUserId=0, std::shared_ptr< SuggestedPostParameters > suggestedPostParameters=nullptr) const
Use this method to send audio files, if you want Telegram clients to display them in the music player...
bool setChatTitle(std::variant< std::int64_t, std::string > chatId, const std::string &title) const
Use this method to change the title of a chat. Titles can't be changed for private chats....
std::shared_ptr< BotName > getMyName(const std::string &languageCode="") const
Use this method to get the current bot name for the given user language. Returns BotName on success.
std::shared_ptr< User > getMe() const
A simple method for testing your bot's authentication token. Requires no parameters....
bool removeChatVerification(std::variant< std::int64_t, std::string > chatId) const
Removes verification from a chat that is currently verified on behalf of the organization represented...
bool deleteChatPhoto(std::variant< std::int64_t, std::string > chatId) const
Use this method to delete a chat photo. Photos can't be changed for private chats....
bool reopenForumTopic(std::variant< std::int64_t, std::string > chatId, std::int32_t messageThreadId) const
Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator...
bool setMyDefaultAdministratorRights(std::shared_ptr< ChatAdministratorRights > rights=nullptr, bool forChannels=false) const
Use this method to change the default administrator rights requested by the bot when it's added as an...
bool sendRichMessageDraft(std::variant< std::int64_t, std::string > chatId, std::int32_t draftId, std::shared_ptr< InputRichMessage > richMessage, std::int32_t messageThreadId=0) const
Use this method to stream a partial rich message to a user while the message is being generated....