From 2727895709acb4c0c76a38bf78d495e5d83bc453 Mon Sep 17 00:00:00 2001 From: PonomareVlad Date: Fri, 22 Apr 2022 03:45:03 +0500 Subject: [PATCH 1/3] Added copyMessage method --- lib/methods.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/methods.js b/lib/methods.js index 9b72edd..6be019b 100644 --- a/lib/methods.js +++ b/lib/methods.js @@ -72,6 +72,10 @@ const methods = { arguments: ['chat_id', 'from_chat_id', 'message_id'] }, + copyMessage: { + arguments: ['chat_id', 'from_chat_id', 'message_id'] + }, + sendPhoto(chat_id, photo, opt) { return sendFile.call(this, 'photo', photo, opt, {chat_id}); }, From bb6366d9ca8525120b897eafb7c461905b622d98 Mon Sep 17 00:00:00 2001 From: PonomareVlad Date: Thu, 9 Jun 2022 18:10:12 +0500 Subject: [PATCH 2/3] copyMessage method in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index fb66182..c95dd15 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,10 @@ Use this method to send text messages. Use this method to forward messages of any kind. +##### `copyMessage(, , , {notification})` + +Use this method to copy messages of any kind. + ##### `deleteMessage(, )` Use this method to delete a message. A message can only be deleted if it was sent less than 48 hours ago. Any such sent outgoing message may be deleted. Additionally, if the bot is an administrator in a group chat, it can delete any message. If the bot is an administrator of a supergroup or channel, it can delete ordinary messages from any other user, including service messages about people added or removed from the chat. Returns *True* on success. From 5a76b745e5ed56e8351b52e19769651233b7e090 Mon Sep 17 00:00:00 2001 From: Vladislav Ponomarev Date: Thu, 26 Jan 2023 17:26:11 +0500 Subject: [PATCH 3/3] Persistent keyboards --- lib/methods.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/methods.js b/lib/methods.js index 6be019b..537cbde 100644 --- a/lib/methods.js +++ b/lib/methods.js @@ -29,6 +29,7 @@ const methods = { if (opt.resize === true) markup['resize_keyboard'] = true; if (opt.once === true) markup['one_time_keyboard'] = true; if (opt.remove === true) markup['remove_keyboard'] = true; + if (opt.persistent === true) markup['is_persistent'] = true; if (opt.selective) markup['selective'] = opt.selective; return markup; },