2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-22 09:57:10 +00:00

fix: setMessageReaction

This commit is contained in:
danielperez9430 2024-02-21 00:59:45 +01:00
parent db976c4598
commit 8f741b2cb6

View File

@ -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<Boolean>} 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 });
}