Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
Telegraf.JS i18n - TypeError: no se pueden leer las propiedades de undefined (leyendo 't') en WizardScene

Todo funciona, pero en la segunda etapa de la escena, i18n está indefinido. i18n está registrado, al igual que las escenas en el bot.

 const createPostHere = new Scenes.WizardScene('createPostHere', async (ctx) => { ctx.wizard.state.post = {} await ctx.reply(await ctx.i18n.t('createPost.promptTitle')) << everything works ctx.wizard.next() }, async (ctx) => { ctx.wizard.state.post.title = ctx.message.text await ctx.reply(await ctx.i18n.t('createPost.promptText')) << node crashes ctx.wizard.next() },

Todo registrado

 bot.use(stage.middleware()); bot.use(i18n.middleware())

la verdad no se donde esta el problema

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

async (ctx) => { await ctx.replyWithHTML( ctx.i18n.t('create-text') ) ctx.scene.state.i18n = ctx.i18n ctx.wizard.next() }, async (ctx) => { const { i18n } = ctx.scene.state await ctx.replyWithHTML(i18n.t('create-details')) await ctx.scene.leave() }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!