From 46e2feabcdd8ed01c6291526373124ce8d01a295 Mon Sep 17 00:00:00 2001 From: YJBeetle Date: Tue, 12 Nov 2019 20:59:24 +0800 Subject: update api and fix https://core.telegram.org/bots/api#deletestickerfromset --- src/Api.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Api.cpp') diff --git a/src/Api.cpp b/src/Api.cpp index 6b41947..5e41551 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -362,11 +362,11 @@ bool Api::setStickerPositionInSet(const string& sticker, uint32_t position) cons return sendRequest("setStickerPositionInSet", args).get("", false); } -bool Api::deleteStickerPositionInSet(const string& sticker) const { +bool Api::deleteStickerFromSet(const string& sticker) const { vector args; args.reserve(1); args.emplace_back("sticker", sticker); - return sendRequest("setStickerPositionInSet", args).get("", false); + return sendRequest("deleteStickerFromSet", args).get("", false); } Message::Ptr Api::sendVideo(int64_t chatId, const boost::variant video, bool supportsStreaming, int32_t duration, int32_t width, int32_t height, const boost::variant thumb, const string &caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, const string& parseMode, bool disableNotification) const { -- cgit v1.2.3 From 9caa6efaf13214613f21e11f5e1536b4ab05c6d6 Mon Sep 17 00:00:00 2001 From: YJBeetle Date: Tue, 12 Nov 2019 23:11:17 +0800 Subject: update api addStickerToSet: remove title https://core.telegram.org/bots/api#addstickertoset --- src/Api.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Api.cpp') diff --git a/src/Api.cpp b/src/Api.cpp index 5e41551..9996108 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -335,12 +335,11 @@ bool Api::createNewStickerSet(int32_t userId, const string& name, const string& return sendRequest("createNewStickerSet", args).get("", false); } -bool Api::addStickerToSet(int32_t userId, const string& name, const string& title, const boost::variant pngSticker, const string& emojis, MaskPosition::Ptr maskPosition) const { +bool Api::addStickerToSet(int32_t userId, const string& name, const boost::variant pngSticker, const string& emojis, MaskPosition::Ptr maskPosition) const { vector args; args.reserve(6); args.emplace_back("user_id", userId); args.emplace_back("name", name); - args.emplace_back("title", title); if (pngSticker.which() == 0 /* InputFile::Ptr */) { auto file = boost::get(pngSticker); args.emplace_back("png_sticker", file->data, true, file->mimeType, file->fileName); -- cgit v1.2.3