Closed bitcoinxtwo closed 4 years ago
You can use a constant string or a function returning a string.
something like this is what i usually go for:
function menuBody(ctx) {
const text = 'Create some text for ' + ctx.from.first_name
return text
}
const menu = new TelegrafInlineMenu(menuBody)
How can i place my query data.
You can use a constant string or a function returning a string.
something like this is what i usually go for:
function menuBody(ctx) { const text = 'Create some text for ' + ctx.from.first_name return text } const menu = new TelegrafInlineMenu(menuBody)
You can call whatever function you want to call from the menuBody function of my example. It is completely independent from the menu there.
I'll just close this due to inactivity. If you have any questions feel free to ask ahead!
i have try use manual method in js/nodejs example code is const menu = new TelegrafInlineMenu(text) i want to be the (text also my sql query data)
const menu = new TelegrafInlineMenu(ctx => con.query('select * from table where id='+ctx.from.id,function(err,result){ //i want my text also mydata query result in here//or other method please }) )