feat: Implement `ctx.menu.at`
Allows to look up menu instances via the context object. They no longer have to be in scope.
This way, the menus can be defined in one file, and then imported and installed on the context object in the main file. They will be available in every other middleware in the code base.
This requires a new context flavour for menus, something that we were able to avoid thus far. However, given that it only really is necessary to be installed when that function is used, this should not be much of an issue.
The usage will be as follows.
await ctx.reply('Menu:', {
reply_markup: ctx.menu.at('id')
})
Regarding performance, a menu instance lookup is going to take O(n) time with n being the number of menu structures. Note that this number is equivalent to the number of menus passed to bot.use calls.