Quiero devolver una función Intenté reemplazar el "Sí" No funciona, cuando miro la función en sí, solo acepta cadenas,
así que estoy desconcertado, porque si uso bot.hear en telegraf, cualquier persona que diga que sí, activará el comando.
¿Hay alguna forma de llamar a una función?
bot.command("report", (ctx) => { ctx.reply("Are you sure? using this will have a refresh timeout of 2 minutes.", { reply_markup: { keyboard: [ /* Inline buttons. 2 side-by-side */ [{ text: "Yes", callback_data: test() }, { text: "No", callback_data: "No" }], /* One button */ [{ text: "Next", callback_data: "next" }], /* Also, we can have URL buttons. */ [{ text: "Open in browser", url: "telegraf.js.org" }] ] } }); }); const test = () => { console.log("test") }