From 949fa65e9c1c98623535aefc870f4ce4205f3b2a Mon Sep 17 00:00:00 2001 From: Saverio Follador Date: Wed, 27 Dec 2017 14:57:48 +0100 Subject: [PATCH] added deleteMessage support --- lib/api/TelegramApi.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/api/TelegramApi.js b/lib/api/TelegramApi.js index 53356fd..018c584 100755 --- a/lib/api/TelegramApi.js +++ b/lib/api/TelegramApi.js @@ -597,6 +597,21 @@ class TelegramApi { .then(r => typeof r.result == 'boolean' ? r.require : Message.deserialize(r.result)) } + /** + * + * @param {number|string} chatId + * @param {number} message_id + * @returns {Promise} + */ + deleteMessage(chat_id, message_id) { + const params = { + chat_id: chatId, + message_id: message_id + } + + return this.call('deleteMessage', Object.assign(params)) + } + /** * * @param {string} inlineQueryId