From 8f741b2cb698cc179eafc2eedbc3b5f12822bb7f Mon Sep 17 00:00:00 2001 From: danielperez9430 Date: Wed, 21 Feb 2024 00:59:45 +0100 Subject: [PATCH] fix: setMessageReaction --- src/telegram.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/telegram.js b/src/telegram.js index d1cd254..a259e00 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -1432,12 +1432,14 @@ class TelegramBot extends EventEmitter { * @param {Number} messageId Unique identifier of the target message * @param {Object} [options] Additional Telegram query options * @return {Promise} True on success - * @see https://core.telegram.org/bots/api#setMessageReaction + * @see https://core.telegram.org/bots/api#setmessagereaction */ setMessageReaction(chatId, messageId, form = {}) { form.chat_id = chatId; form.message_id = messageId; - form.reaction = stringify(form.reaction); + if (form.reaction) { + form.reaction = stringify(form.reaction); + } return this._request('setMessageReaction', { form }); }