diff options
author | YJBeetle <yjbeetle@gmail.com> | 2019-11-12 20:59:24 +0800 |
---|---|---|
committer | YJBeetle <yjbeetle@gmail.com> | 2019-11-12 20:59:24 +0800 |
commit | 46e2feabcdd8ed01c6291526373124ce8d01a295 (patch) | |
tree | 0b6550cf960e8bf23614a78f9140ad02805df5b0 | |
parent | f239eef1eb7e7145bf8eddbeb7e496f266101723 (diff) |
update api and fix
https://core.telegram.org/bots/api#deletestickerfromset
-rw-r--r-- | include/tgbot/Api.h | 2 | ||||
-rw-r--r-- | src/Api.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h index 84a6c9b..51c28e7 100644 --- a/include/tgbot/Api.h +++ b/include/tgbot/Api.h @@ -273,7 +273,7 @@ public: * @param stickers File identifier of the sticker. * @return Returns True on success. */ - bool deleteStickerPositionInSet(const std::string& sticker) const; + bool deleteStickerFromSet(const std::string& sticker) const; /** * @brief Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). 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<bool>("", false); } -bool Api::deleteStickerPositionInSet(const string& sticker) const { +bool Api::deleteStickerFromSet(const string& sticker) const { vector<HttpReqArg> args; args.reserve(1); args.emplace_back("sticker", sticker); - return sendRequest("setStickerPositionInSet", args).get<bool>("", false); + return sendRequest("deleteStickerFromSet", args).get<bool>("", false); } Message::Ptr Api::sendVideo(int64_t chatId, const boost::variant<InputFile::Ptr, std::string> video, bool supportsStreaming, int32_t duration, int32_t width, int32_t height, const boost::variant<InputFile::Ptr, std::string> thumb, const string &caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, const string& parseMode, bool disableNotification) const { |