diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Api.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Api.cpp b/src/Api.cpp index 8029c33..b9ea183 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -657,6 +657,10 @@ bool Api::unbanChatMember(int64_t chatId, int32_t userId) const { return sendRequest("unbanChatMember", args).get<bool>("", false); } +void Api::deleteMessage(int64_t chatId, int32_t messageId) const { + sendRequest("deleteMessage", { HttpReqArg("chat_id", chatId), HttpReqArg("message_id", messageId) }); +} + ptree Api::sendRequest(const string& method, const vector<HttpReqArg>& args) const { string url = "https://api.telegram.org/bot"; @@ -692,8 +696,4 @@ std::string Api::downloadFile(const std::string& filePath, const std::vector<Htt return serverResponse; } -void Api::deleteMessage(int64_t chatId, int32_t messageId) const { - sendRequest("deleteMessage", { HttpReqArg("chat_id", chatId), HttpReqArg("message_id", messageId) }); -} - } |