Closed cleivson closed 1 year ago
The setMyCommands
api also has type problems.
Here is an example:
For getMyCommands you also miss the "scope" field in your object @cleivson
bot.getMyCommands({ scope: { type: "all_private_chats" } })
In the next release with the Telegram Bot API 6.4 the issure also with the stringify is solve
Fixed on v0.61.0
I have read:
I am using the latest version of the library.
Expected Behavior
When calling
getMyCommands
with the parameters defined on the Typescript version with different scopes, the different command sets associated with the scopes should be returned.Actual Behavior
Right now it looks like the type definition and the actual signature don't match and it completely ignores both the locale and scope parameters of the GetMyCommands because it considers the first parameter to be the "form" field of the request but it's actually the scope object. Basically, the correct interface of the method should be
(form: { scope: BotScope, language_code: string })
rather than(scope: BotScope, language_code: string)
as mentioned in the typescript definition. Also, the scope parameter must be stringified but it's currently not.Steps to reproduce the Behavior