Closed expelliamus closed 4 years ago
Hi @expelliamus! How did you solved this issue? I have two nested menus and i18n is missing in last one context.
@gavrilin-remote
I suggest switching over to @grammyjs/i18n
as its an actively supported fork of this library.
If you are using typescript it might be that your second menu doesnt have the MyContext
thingy which knows about the i18n stuff?
I found a solution! Make sure that your i18n middleware is placed above that your menus middlewares.
Hi,
I saw a similar issue but I can't get this working, hope you will help. Essentially I have
app.js
as entry point of my application, this file contains the following:I load the server configuration passing in the constructor
app
andexpress
:the main logic for the menu is on
bot.controller
which contains this definition:` const Telegraf = require('telegraf'); const { MainMenu } = require('../middlewares/menu/mainMenu');
}
exports.Bot = Bot;`
and here is the problem:
` const TelegrafInlineMenu = require('telegraf-inline-menu'); const SubscriptionMenu = require('./submenu/subscriptionMenu');
class MainMenu {
here I get:
what I did wrong? Thanks, and good holidays