'Telegram bot: List of telegram bot commands

I can not find how to get a list of commands from a telegram bot. Neither via api nor via external binding. Is it even possible? For example. I created a list of commands to bot with help the Bot Father. Now i want to get this list from my programm to check user input a command. Thanks in advance.



Solution 1:[1]

you can use the getMyCommands method

Use this method to get the current list of the bot's commands for the given scope and user language. Returns Array of BotCommand on success. If commands aren't set, an empty list is returned.

Parameter Type Required Description
scope BotCommandScope Optional A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.
language_code String Optional A two-letter ISO 639-1 language code or an empty string

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aref Solaimany