Question: How to create default menu button?
jokaorgua opened this issue · comments
jokaorgua commented
Hello.
Could you please help how to dynamically create menu button for the bot during the bot startup? (I can achieve that using BotFather menu - Edit bot - Commands) but I want to do that dynamically from my code.
Thanks in advance.
jokaorgua commented
If anyone will get here
the following code automatically creates a menu button. Make sure you are passing array of commands, not just commands one by one
testCommand := tele.Command{Text: "/test1", Description: "test1"}
commands := []tele.Command{testCommand}
err := b.SetCommands(commands)