From 941c97706cb5b81d5a2e44a827e8f6bf76a2c6bd Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Fri, 27 Jul 2018 17:40:44 +0900 Subject: Bot API 4.0 - Part 2 --- include/tgbot/Api.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include/tgbot/Api.h') diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h index 2af7be2..480949e 100644 --- a/include/tgbot/Api.h +++ b/include/tgbot/Api.h @@ -681,6 +681,24 @@ public: Message::Ptr editMessageCaption(int64_t chatId = 0, int32_t messageId = 0, const std::string& caption = "", const std::string& inlineMessageId = "", GenericReply::Ptr replyMarkup = std::make_shared()) const; + /** + * @brief Use this method to edit audio, document, photo, or video messages. + * + * + * If a message is a part of a message album, then it can be edited only to a photo or a video. + * Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. + * Use previously uploaded file via its file_id or specify a URL. + * + * @param media A JSON-serialized object for a new media content of the message. + * @param chatId Optional Required if inline_message_id is not specified. Unique identifier for the target chat of the target channel. + * @param messageId Optional Required if inline_message_id is not specified. Identifier of the sent message + * @param inlineMessageId Optional Required if chat_id and message_id are not specified. Identifier of the inline message + * @param replyMarkup Optional A JSON-serialized object for an inline keyboard. + * @return On success, if the edited message was sent by the bot, the edited Message is returned, otherwise nullptr is returned. + */ + Message::Ptr editMessageMedia(InputMedia::Ptr media, int64_t chatId = 0, int32_t messageId = 0, const std::string& inlineMessageId = "", + GenericReply::Ptr replyMarkup = std::make_shared()) const; + /** * @brief Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). * @param chatId Optional Required if inline_message_id is not specified. Unique identifier for the target chat of the target channel. -- cgit v1.2.3