Reputation: 81
Is it possible to automate the setcommands command? Instead of going to Botfather. Is there any way to doing from my code using Telegram API or anything else?
Upvotes: 1
Views: 1252
Reputation: 3067
I guess this wasn't the case when this was asked, but currently (2023), the Telegram Bot API does have a setMyCommands method.
So, using the bot API, you can send a request to https://api.telegram.org/bot<API_KEY>/setMyCommands
.
Details here: https://core.telegram.org/bots/api#setmycommands
Upvotes: 2
Reputation: 114
Telegram Bot API currently doesn't support interacting with other bots. If you really need adding commands to your bot programmatically, go through Telegram API (Don't confuse it with Bot API. This API is used for creating telegram clients, not bots) and contact @BotFather.
However, doing that doesn't seem reasonable. Instead, there might be a simpler approach so you don't need to add commands to your bot programmatically.
Upvotes: 1