diff options
author | Konstantin Kukin <kukin.konstantin@gmail.com> | 2016-12-29 17:50:00 +0300 |
---|---|---|
committer | Konstantin Kukin <kukin.konstantin@gmail.com> | 2016-12-29 17:50:00 +0300 |
commit | 33e4184338cc7b9ecd8af36ee0ecaff74020356c (patch) | |
tree | 1e8629a49770fe59249cd80b28c8ec4b4042de35 /include/tgbot | |
parent | 187311fc635c843f10c275c7e230543b5f67e703 (diff) |
Rename ReplyKeyboardHide to ReplyKeyboardRemove
Diffstat (limited to 'include/tgbot')
-rw-r--r-- | include/tgbot/TgTypeParser.h | 3 | ||||
-rw-r--r-- | include/tgbot/tgbot.h | 2 | ||||
-rw-r--r-- | include/tgbot/types/InlineQueryResult.h | 6 | ||||
-rw-r--r-- | include/tgbot/types/ReplyKeyboardHide.h | 55 |
4 files changed, 4 insertions, 62 deletions
diff --git a/include/tgbot/TgTypeParser.h b/include/tgbot/TgTypeParser.h index 66e2c41..48f7338 100644 --- a/include/tgbot/TgTypeParser.h +++ b/include/tgbot/TgTypeParser.h @@ -44,7 +44,6 @@ #include "tgbot/types/ReplyKeyboardMarkup.h" #include "tgbot/types/KeyboardButton.h" #include "tgbot/types/ReplyKeyboardRemove.h" -#include "tgbot/types/ReplyKeyboardHide.h" #include "tgbot/types/ForceReply.h" #include "tgbot/types/ChatMember.h" #include "tgbot/types/ResponseParameters.h" @@ -133,8 +132,6 @@ public: ReplyKeyboardRemove::Ptr parseJsonAndGetReplyKeyboardRemove(const boost::property_tree::ptree& data) const; std::string parseReplyKeyboardRemove(const ReplyKeyboardRemove::Ptr& object) const; - ReplyKeyboardHide::Ptr parseJsonAndGetReplyKeyboardHide(const boost::property_tree::ptree& data) const; - std::string parseReplyKeyboardHide(const ReplyKeyboardHide::Ptr& object) const; ForceReply::Ptr parseJsonAndGetForceReply(const boost::property_tree::ptree& data) const; std::string parseForceReply(const ForceReply::Ptr& object) const; diff --git a/include/tgbot/tgbot.h b/include/tgbot/tgbot.h index 34dc0a9..36b7dab 100644 --- a/include/tgbot/tgbot.h +++ b/include/tgbot/tgbot.h @@ -38,7 +38,7 @@ #include "tgbot/types/Location.h" #include "tgbot/types/Message.h" #include "tgbot/types/PhotoSize.h" -#include "tgbot/types/ReplyKeyboardHide.h" +#include "tgbot/types/ReplyKeyboardRemove.h" #include "tgbot/types/ReplyKeyboardMarkup.h" #include "tgbot/types/Sticker.h" #include "tgbot/types/Update.h" diff --git a/include/tgbot/types/InlineQueryResult.h b/include/tgbot/types/InlineQueryResult.h index 29e6f7a..d06bffd 100644 --- a/include/tgbot/types/InlineQueryResult.h +++ b/include/tgbot/types/InlineQueryResult.h @@ -38,12 +38,12 @@ public: std::string id; /** - * Optional. Title of the result. + * Requred, optional or missing. See description of derived classes. Title of the result. */ std::string title; /** - * Optional. Caption of the file to be sent, 0-200 characters + * Optional or missing. See description of derived classes. Caption of the file to be sent, 0-200 characters */ std::string caption; @@ -53,7 +53,7 @@ public: InlineKeyboardMarkup::Ptr replyMarkup; /** - * Content of the message to be sent + * Requred, optional or missing. See description of derived classes. Content of the message to be sent */ InputMessageContent::Ptr inputMessageContent; }; diff --git a/include/tgbot/types/ReplyKeyboardHide.h b/include/tgbot/types/ReplyKeyboardHide.h deleted file mode 100644 index acb0e5c..0000000 --- a/include/tgbot/types/ReplyKeyboardHide.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2015 Oleg Morozenkov - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef TGBOT_CPP_REPLYKEYBOARDHIDE_H -#define TGBOT_CPP_REPLYKEYBOARDHIDE_H - -#include <memory> - -#include "tgbot/types/GenericReply.h" - -namespace TgBot { - -/** - * Upon receiving a message with this object, Telegram clients will hide the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). - * @ingroup types - */ -class ReplyKeyboardHide : public GenericReply { - -public: - typedef std::shared_ptr<ReplyKeyboardHide> Ptr; - - /** - * Requests clients to hide the custom keyboard. - */ - const bool hideKeyboard = true; - - /** - * Optional. Use this parameter if you want to hide keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. - * Example: A user votes in a poll, bot returns confirmation message in reply to the vote and hides keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. - */ - bool selective = false; -}; - -} - -#endif //TGBOT_CPP_REPLYKEYBOARDHIDE_H |