grammy-inline-menu
grammy-inline-menu copied to clipboard
How do I call navigate in the code?
how can I make a transition to another page using return in do()
// ✅ It works
mainMenu.navigate("/item:1", {
text: "item 1",
});
// ❌ it doesn't work (how to fix it?)
mainMenu.interact(nanoid(), {
text: "item 2",
do: () => "/item:2",
});
mainMenu.manualAction(/item:(\d+)/, async (ctx) => {
await editMenuOnContext(itemMenu, ctx, "/");
return false;
});
tried different options: /item:2, /item:2/, item:2/, ../item:2, ../item:2/
Have you checked out How does it work on the README? Adding the suggested bot.use with a console.log can be quite helpful in order to figure out where the menu is you want to trigger manually.
As you try to trigger them starting with / it might not be on the root level so not starting with the /?
I'll just close this due to inactivity. If you have any questions feel free to ask ahead!