diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c1d8fe..3b9a508 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). * hideGeneralForumTopic * unhideGeneralForumTopic -2. Minor changes: +2. Minor changes: (@danielperez9430) * The parameters `name` and `icon_custom_emoji_id` of the method `editForumTopic` are now optional. * Fix add thumb in sendAudio, sendVideo and sendVideoNote + * Fix getMyCommands and setMyCommands + * Suggested tip amounts stringify in sendInvoice ## [0.60.0][0.60.0] - 2022-10-06 1. Support Telegram Bot API v6.3 (@danielperez9430) diff --git a/src/telegram.js b/src/telegram.js index f1607a2..1081624 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -2127,6 +2127,11 @@ class TelegramBot extends EventEmitter { */ setMyCommands(commands, form = {}) { form.commands = stringify(commands); + + if (form.scope) { + form.scope = stringify(form.scope); + } + return this._request('setMyCommands', { form }); } @@ -2152,6 +2157,9 @@ class TelegramBot extends EventEmitter { * @see https://core.telegram.org/bots/api#getmycommands */ getMyCommands(form = {}) { + if (form.scope) { + form.scope = stringify(form.scope); + } return this._request('getMyCommands', { form }); } @@ -2622,6 +2630,9 @@ class TelegramBot extends EventEmitter { form.currency = currency; form.prices = stringify(prices); form.provider_data = stringify(form.provider_data); + if (form.suggested_tip_amounts) { + form.suggested_tip_amounts = stringify(form.suggested_tip_amounts); + } return this._request('sendInvoice', { form }); }